From 130fbc7f6c67357a58823c8f17ecef7d276386a9 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 16 Feb 2021 21:02:03 +0100 Subject: 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 Signed-off-by: Sascha Hauer --- include/ata_drive.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/ata_drive.h') 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); }; -- cgit v1.2.3