Skip to contentSkip to conversation

ata: ide-sff: add LBA48 support

PATCH Superseded Antony Pavlov 1 participant 1 message Mar 20, 2017 libata

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: ide-sff: add LBA48 support

See http://wiki.osdev.org/ATA_PIO_Mode#48_bit_PIO for datails.

---
 drivers/ata/disk_ata_drive.c |  1 +
 drivers/ata/ide-sff.c        | 54 +++++++++++++++++++++++++++++++++++---------
 include/ata_drive.h          |  3 +++
 3 files changed, 47 insertions(+), 11 deletions(-)
drivers/ata/disk_ata_drive.c +1 -0
index 1aa1bb145..7b5305990 100644
@@ -233,6 +233,7 @@ static int ata_port_init(struct ata_port *port)
 	}
 
 	ata_fix_endianess(port->id, SECTOR_SIZE / sizeof(uint16_t));
+	port->lba48 = ata_id_has_lba48(port->id);
 
 #ifdef DEBUG
 	ata_dump_id(port->id);
drivers/ata/ide-sff.c +43 -11

80 lines not on this page · raw message

include/ata_drive.h +3 -0
index 44073cb1b..11685eef1 100644
@@ -37,8 +37,10 @@
 
 #define ATA_CMD_ID_ATA		0xEC
 #define ATA_CMD_READ		0x20
+#define ATA_CMD_PIO_READ_EXT	0x24
 #define ATA_CMD_READ_EXT	0x25
 #define ATA_CMD_WRITE		0x30
+#define ATA_CMD_PIO_WRITE_EXT	0x34
 #define ATA_CMD_WRITE_EXT	0x35
 
 /* drive's status flags */
@@ -140,6 +142,7 @@ struct ata_port {
 	void *drvdata;
 	struct block_device blk;
 	uint16_t *id;
+	int lba48;
 	int initialized;
 	int probe;
 };
Signature · 7 lines
2.11.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox