ATA devices.
Definition in file ata.h.
int ata_open |
( |
struct interface * |
block, |
|
|
struct interface * |
ata, |
|
|
unsigned int |
device, |
|
|
unsigned int |
max_count |
|
) |
| |
Open ATA device.
- Parameters
-
block | Block control interface |
ata | ATA control interface |
device | ATA device number |
max_count | Maximum number of blocks per single transfer |
- Return values
-
Definition at line 662 of file ata.c.
667 atadev =
zalloc (
sizeof ( *atadev ) );
#define ref_init(refcnt, free)
Initialise a reference counter.
void intf_plug_plug(struct interface *a, struct interface *b)
Plug two object interfaces together.
unsigned int device
Device number.
uint16_t device
Device ID.
static struct interface_descriptor atadev_block_desc
ATA device block interface descriptor.
#define ENOMEM
Not enough space.
struct interface block
Block control interface.
struct refcnt refcnt
Reference count.
void * zalloc(size_t size)
Allocate cleared memory.
unsigned int max_count
Maximum number of blocks per single transfer.
struct interface ata
ATA control interface.
uint8_t block[3][8]
DES-encrypted blocks.
static struct interface_descriptor atadev_ata_desc
ATA device ATA interface descriptor.
static void intf_init(struct interface *intf, struct interface_descriptor *desc, struct refcnt *refcnt)
Initialise an object interface.
#define NULL
NULL pointer (VOID *)
#define ref_put(refcnt)
Drop reference to object.
References ata_device::ata, atadev_ata_desc, atadev_block_desc, block, ata_device::block, device, ata_device::device, ENOMEM, intf_init(), intf_plug_plug(), ata_device::max_count, NULL, ref_init, ref_put, ata_device::refcnt, and zalloc().
Referenced by aoedev_open().