diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-10-31 21:50:09 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-10-31 21:51:42 -0400 |
commit | 0a11b06d93c7593350d07e944adc00ab0e1d0108 (patch) | |
tree | 189d4f9a1a5bcef22edef6236232b0394b90d087 /firmware/target/arm/s5l8702/ipod6g | |
parent | d401501fdad9a3c0299e1b8bdfadcb8a41c2eba5 (diff) | |
download | rockbox-0a11b06d93c7593350d07e944adc00ab0e1d0108.tar.gz rockbox-0a11b06d93c7593350d07e944adc00ab0e1d0108.zip |
ata: Correct parsing of the logical sector size in the IDENTIFY DEVICE
....It's specified in 16-bit words, not bytes. So multiply it by 2.
(This hasn't been a problem in practice as everything uses 512B logical
sectors so far..)
Change-Id: I0b1abd0f6184330f0b7f5c000c5ad547038f7c95
Diffstat (limited to 'firmware/target/arm/s5l8702/ipod6g')
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/storage_ata-6g.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/storage_ata-6g.c b/firmware/target/arm/s5l8702/ipod6g/storage_ata-6g.c index 21c6f3f7c0..3c7935ad89 100644 --- a/firmware/target/arm/s5l8702/ipod6g/storage_ata-6g.c +++ b/firmware/target/arm/s5l8702/ipod6g/storage_ata-6g.c | |||
@@ -1145,8 +1145,8 @@ void ata_spin(void) | |||
1145 | void ata_get_info(IF_MD(int drive,) struct storage_info *info) | 1145 | void ata_get_info(IF_MD(int drive,) struct storage_info *info) |
1146 | { | 1146 | { |
1147 | /* Logical sector size */ | 1147 | /* Logical sector size */ |
1148 | if ((ata_identify_data[106] & 0xd000) == 0x5000) | 1148 | if ((ata_identify_data[106] & 0xd000) == 0x5000) /* B14, B12 */ |
1149 | info->sector_size = ata_identify_data[117] | (ata_identify_data[118] << 16); | 1149 | info->sector_size = (ata_identify_data[117] | (ata_identify_data[118] << 16)) * 2; |
1150 | else | 1150 | else |
1151 | info->sector_size = SECTOR_SIZE; | 1151 | info->sector_size = SECTOR_SIZE; |
1152 | 1152 | ||