mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 05:32:40 -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
|
/* 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.
|
* is not used for writing on non-SSDs as it appears to be slower.
|
||||||
*/
|
*/
|
||||||
if (!ata_disk_isssd())
|
if (write) {
|
||||||
return false;
|
if ((unsigned long)addr & 3)
|
||||||
|
return false;
|
||||||
if (write && ((unsigned long)addr & 3))
|
if (!ata_disk_isssd())
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#if ATA_MAX_UDMA > 2
|
#if ATA_MAX_UDMA > 2
|
||||||
if (dma_needs_boost && !dma_boosted) {
|
if (dma_needs_boost && !dma_boosted) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue