mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
ata: Prefer using "virtual" sector size where possible
Normally, if a device uses larger physical sector size than the logical size and supports so-called "512e" mode, we let the device deal with partial sector reads/writes. However, if MAX_VIRT_SECTOR_SIZE is defined, we support partitioning/filesystems that use a larger "virtual" sector than the logical sector. typically this matches the physical sector size of the drive, which means that despite a small logical sector size, all I/O is done in terms of the physical sector size. Therefore, when MAX_VIRT_SECTOR_SIZE and MAX_PHYS_SECTOR_SIZE are enabled (currently only ipod5g and ipod6g), prefer software-based partial sector I/O. Change-Id: I0815ad0a2f987b89bb2debfbf3d0ed64cdf85525
This commit is contained in:
parent
120906dc8b
commit
9bf033dd66
3 changed files with 24 additions and 0 deletions
|
|
@ -235,4 +235,8 @@ int ata_read_smart(struct ata_smart_values*);
|
|||
|
||||
#define ATA_IDENTIFY_WORDS 256
|
||||
|
||||
#ifdef MAX_PHYS_SECTOR_SIZE
|
||||
void ata_set_phys_sector_mult(unsigned int mult);
|
||||
#endif
|
||||
|
||||
#endif /* __ATA_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue