summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-10-26 15:07:57 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-10-26 15:09:10 -0400
commit3951fbf9d2b5609b44aa639f6c24e0d970cbf931 (patch)
treec01e99868bae046c4dbd5bcf0fb25f6d6b324128 /firmware/drivers/ata.c
parentaea4974b88bf5ea2a87fcc23d5f8bca422242dc0 (diff)
downloadrockbox-3951fbf9d2b5609b44aa639f6c24e0d970cbf931.tar.gz
rockbox-3951fbf9d2b5609b44aa639f6c24e0d970cbf931.zip
ATA: Restrict to UDMA2 if we don't detect an "80-pin" cable
Change-Id: I55861065741f3365491445f1f3f5b0041f33e1c6
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r--firmware/drivers/ata.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 5331e7f589..cb857158ca 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -1116,8 +1116,13 @@ static int set_features(void)
1116 1116
1117#ifdef HAVE_ATA_DMA 1117#ifdef HAVE_ATA_DMA
1118 if (identify_info[53] & (1<<2)) { 1118 if (identify_info[53] & (1<<2)) {
1119 int max_udma = ATA_MAX_UDMA;
1120#if ATA_MAX_UDMA > 2
1121 if (!(ata_identify_data[93] & BIT(13)))
1122 max_udma = 2;
1123#endif
1119 /* Ultra DMA mode info present, find a mode */ 1124 /* Ultra DMA mode info present, find a mode */
1120 dma_mode = ata_get_best_mode(identify_info[88], ATA_MAX_UDMA, 0x40); 1125 dma_mode = ata_get_best_mode(identify_info[88], max_udma, 0x40);
1121 } 1126 }
1122 1127
1123 if (!dma_mode) { 1128 if (!dma_mode) {