54 #if __BYTE_ORDER == __LITTLE_ENDIAN 62 #elif __BYTE_ORDER == __BIG_ENDIAN 71 #error "I need a byte order" 82 #if __BYTE_ORDER == __LITTLE_ENDIAN 85 #elif __BYTE_ORDER == __BIG_ENDIAN 89 #error "I need a byte order" 111 #define ATA_DEV_OBSOLETE 0xa0 114 #define ATA_DEV_LBA 0x40 117 #define ATA_DEV_SLAVE 0x10 120 #define ATA_DEV_MASTER 0x00 123 #define ATA_DEV_MASK 0xf0 126 #define ATA_CMD_READ 0x20 129 #define ATA_CMD_READ_EXT 0x24 132 #define ATA_CMD_WRITE 0x30 135 #define ATA_CMD_WRITE_EXT 0x34 138 #define ATA_CMD_IDENTIFY 0xec 141 #define ATA_STAT_ERR 0x01 162 #define ATA_SUPPORTS_LBA48 ( 1 << 10 ) 165 #define ATA_SECTOR_SIZE 512 197 #define ata_command_TYPE( object_type ) \ 198 typeof ( int ( object_type, struct interface *data, \ 199 struct ata_cmd *command ) ) 202 unsigned int device,
unsigned int max_count );
userptr_t data_out
Data-out buffer (may be NULL)
size_t data_in_len
Data-in buffer length.
unsigned long long uint64_t
Structure returned by ATA IDENTIFY command.
union ata_lba lba
Logical block address.
Access to external ("user") memory.
union ata_fifo count
Sector count.
uint64_t native
LBA as a 64-bit integer in native-endian order.
uint8_t cmd_stat
Command/status register.
uint32_t userptr_t
A pointer to a user buffer.
uint8_t device
Device register.
An ATA command information unit.
struct ata_cb cb
ATA command block.
struct ata_fifo::@501 bytes
ATA registers.
size_t data_out_len
Data-out buffer length.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int ata_open(struct interface *block, struct interface *ata, unsigned int device, unsigned int max_count)
Open ATA device.
userptr_t data_in
Data-in buffer (may be NULL)
An ATA Logical Block Address.
int lba48
Use LBA48 extended addressing.
uint16_t native
Value in native-endian order.
uint8_t block[3][8]
DES-encrypted blocks.
union ata_fifo err_feat
Error/feature register.
An ATA 2-byte FIFO register.
uint8_t data[48]
Additional event data.
struct ata_lba::@500 bytes
ATA registers.
int ata_command(struct interface *control, struct interface *data, struct ata_cmd *command)
Issue ATA command.