mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
pp5020: It's okay to use DMA reads on non-SSDs
Fixes a regression introduced in 4b423e21f6
Change-Id: Ief4a4a562840524b98ad5988999bac87586dec41
This commit is contained in:
parent
a6f0044d40
commit
9c53fa1b0a
1 changed files with 6 additions and 5 deletions
|
|
@ -175,11 +175,12 @@ bool ata_dma_setup(void *addr, unsigned long bytes, bool write) {
|
|||
/* Writes only need to be word-aligned, but by default DMA
|
||||
* is not used for writing on non-SSDs as it appears to be slower.
|
||||
*/
|
||||
if (write) {
|
||||
if ((unsigned long)addr & 3)
|
||||
return false;
|
||||
if (!ata_disk_isssd())
|
||||
return false;
|
||||
|
||||
if (write && ((unsigned long)addr & 3))
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ATA_MAX_UDMA > 2
|
||||
if (dma_needs_boost && !dma_boosted) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue