diff options
-rw-r--r-- | apps/debug_menu.c | 6 | ||||
-rw-r--r-- | firmware/drivers/ata.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/storage_ata-6g.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 6f30d00d49..62750a716a 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -1442,8 +1442,8 @@ static int disk_callback(int btn, struct gui_synclist *lists) | |||
1442 | uint32_t sector_size; | 1442 | uint32_t sector_size; |
1443 | 1443 | ||
1444 | /* Logical sector size > 512B ? */ | 1444 | /* Logical sector size > 512B ? */ |
1445 | if ((identify_info[106] & 0xd000) == 0x5000) | 1445 | if ((identify_info[106] & 0xd000) == 0x5000) /* B14, B12 */ |
1446 | sector_size = identify_info[117] | (identify_info[118] << 16); | 1446 | sector_size = (identify_info[117] | (identify_info[118] << 16)) * 2; |
1447 | else | 1447 | else |
1448 | sector_size = SECTOR_SIZE; | 1448 | sector_size = SECTOR_SIZE; |
1449 | 1449 | ||
@@ -1456,7 +1456,7 @@ static int disk_callback(int btn, struct gui_synclist *lists) | |||
1456 | simplelist_addline("Sector multiplier: %u", disk_get_sector_multiplier()); | 1456 | simplelist_addline("Sector multiplier: %u", disk_get_sector_multiplier()); |
1457 | #endif | 1457 | #endif |
1458 | 1458 | ||
1459 | if((identify_info[106] & 0xe000) == 0x6000) | 1459 | if((identify_info[106] & 0xe000) == 0x6000) /* B14, B13 */ |
1460 | sector_size *= BIT_N(identify_info[106] & 0x000f); | 1460 | sector_size *= BIT_N(identify_info[106] & 0x000f); |
1461 | simplelist_addline( | 1461 | simplelist_addline( |
1462 | "Physical sector size: %lu B", sector_size); | 1462 | "Physical sector size: %lu B", sector_size); |
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 8df9acb9da..7bb492c39d 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -1310,7 +1310,7 @@ int STORAGE_INIT_ATTR ata_init(void) | |||
1310 | 1310 | ||
1311 | #ifdef MAX_PHYS_SECTOR_SIZE | 1311 | #ifdef MAX_PHYS_SECTOR_SIZE |
1312 | /* Find out the physical sector size */ | 1312 | /* Find out the physical sector size */ |
1313 | if((identify_info[106] & 0xe000) == 0x6000) | 1313 | if((identify_info[106] & 0xe000) == 0x6000) /* B14, B13 */ |
1314 | phys_sector_mult = BIT_N(identify_info[106] & 0x000f); | 1314 | phys_sector_mult = BIT_N(identify_info[106] & 0x000f); |
1315 | else | 1315 | else |
1316 | phys_sector_mult = 1; | 1316 | phys_sector_mult = 1; |
@@ -1386,8 +1386,8 @@ void ata_get_info(IF_MD(int drive,)struct storage_info *info) | |||
1386 | int i; | 1386 | int i; |
1387 | 1387 | ||
1388 | /* Logical sector size > 512B ? */ | 1388 | /* Logical sector size > 512B ? */ |
1389 | if ((identify_info[106] & 0xd000) == 0x5000) | 1389 | if ((identify_info[106] & 0xd000) == 0x5000) /* B14, B12 */ |
1390 | info->sector_size = identify_info[117] | (identify_info[118] << 16); | 1390 | info->sector_size = (identify_info[117] | (identify_info[118] << 16)) * 2; |
1391 | else | 1391 | else |
1392 | info->sector_size = SECTOR_SIZE; | 1392 | info->sector_size = SECTOR_SIZE; |
1393 | 1393 | ||
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 | ||