53 #if __BYTE_ORDER == __LITTLE_ENDIAN 61 #elif __BYTE_ORDER == __BIG_ENDIAN 70 #error "I need a byte order" 81 #if __BYTE_ORDER == __LITTLE_ENDIAN 84 #elif __BYTE_ORDER == __BIG_ENDIAN 88 #error "I need a byte order" 110 #define ATA_DEV_OBSOLETE 0xa0 113 #define ATA_DEV_LBA 0x40 116 #define ATA_DEV_SLAVE 0x10 119 #define ATA_DEV_MASTER 0x00 122 #define ATA_DEV_MASK 0xf0 125 #define ATA_CMD_READ 0x20 128 #define ATA_CMD_READ_EXT 0x24 131 #define ATA_CMD_WRITE 0x30 134 #define ATA_CMD_WRITE_EXT 0x34 137 #define ATA_CMD_IDENTIFY 0xec 140 #define ATA_STAT_ERR 0x01 161 #define ATA_SUPPORTS_LBA48 ( 1 << 10 ) 164 #define ATA_SECTOR_SIZE 512 196 #define ata_command_TYPE( object_type ) \ 197 typeof ( int ( object_type, struct interface *data, \ 198 struct ata_cmd *command ) ) 201 unsigned int device,
unsigned int max_count );
size_t data_in_len
Data-in buffer length.
struct ata_lba::@509 bytes
ATA registers.
unsigned long long uint64_t
Structure returned by ATA IDENTIFY command.
union ata_lba lba
Logical block address.
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.
struct ata_fifo::@510 bytes
ATA registers.
uint8_t device
Device register.
An ATA command information unit.
struct ata_cb cb
ATA command block.
void * data_in
Data-in buffer (may be NULL)
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.
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.
void * data_out
Data-out buffer (may be NULL)
int ata_command(struct interface *control, struct interface *data, struct ata_cmd *command)
Issue ATA command.