mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
ATA: Restrict to UDMA2 if we don't detect an "80-pin" cable
Change-Id: I55861065741f3365491445f1f3f5b0041f33e1c6
This commit is contained in:
parent
aea4974b88
commit
3951fbf9d2
3 changed files with 23 additions and 6 deletions
|
|
@ -1116,8 +1116,13 @@ static int set_features(void)
|
|||
|
||||
#ifdef HAVE_ATA_DMA
|
||||
if (identify_info[53] & (1<<2)) {
|
||||
int max_udma = ATA_MAX_UDMA;
|
||||
#if ATA_MAX_UDMA > 2
|
||||
if (!(ata_identify_data[93] & BIT(13)))
|
||||
max_udma = 2;
|
||||
#endif
|
||||
/* Ultra DMA mode info present, find a mode */
|
||||
dma_mode = ata_get_best_mode(identify_info[88], ATA_MAX_UDMA, 0x40);
|
||||
dma_mode = ata_get_best_mode(identify_info[88], max_udma, 0x40);
|
||||
}
|
||||
|
||||
if (!dma_mode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue