From 3951fbf9d2b5609b44aa639f6c24e0d970cbf931 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sat, 26 Oct 2024 15:07:57 -0400 Subject: ATA: Restrict to UDMA2 if we don't detect an "80-pin" cable Change-Id: I55861065741f3365491445f1f3f5b0041f33e1c6 --- firmware/drivers/ata.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'firmware/drivers') 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) #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) { -- cgit v1.2.3