diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-02-16 21:02:03 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-18 09:23:42 +0100 |
commit | 130fbc7f6c67357a58823c8f17ecef7d276386a9 (patch) | |
tree | cbf03d20fa48605aac314b871ffa925c76a2013f /include/ata_drive.h | |
parent | 47fe8d54c41a8076bb936f4b45304117af3a493d (diff) | |
download | barebox-130fbc7f6c67357a58823c8f17ecef7d276386a9.tar.gz barebox-130fbc7f6c67357a58823c8f17ecef7d276386a9.tar.xz |
block: use 64-bit types for sector offset and count on all platforms
barebox' use of int for the sector offset puts an upper bound of 1TB on
the size of supported block devices, which is already exceeded by common
place USB mass storage. Increasing the sizes involved to 64 bit
like Linux does won't magically add missing driver support, but it gives
us at least a fighting chance. Do so.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/ata_drive.h')
-rw-r--r-- | include/ata_drive.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ata_drive.h b/include/ata_drive.h index eae74db855..6b8915c9cb 100644 --- a/include/ata_drive.h +++ b/include/ata_drive.h @@ -115,8 +115,8 @@ struct ata_port; struct ata_port_operations { int (*init)(struct ata_port *port); - int (*read)(struct ata_port *port, void *buf, unsigned int block, int num_blocks); - int (*write)(struct ata_port *port, const void *buf, unsigned int block, int num_blocks); + int (*read)(struct ata_port *port, void *buf, sector_t block, blkcnt_t num_blocks); + int (*write)(struct ata_port *port, const void *buf, sector_t block, blkcnt_t num_blocks); int (*read_id)(struct ata_port *port, void *buf); int (*reset)(struct ata_port *port); }; |