FS#13560: ATA: Don't check for 80 pin cables on SATA devices.

On PATA, we'd cap our transers at UDMA2 if the device reported that an
80 pin cable wasn't detected, but SATA devices do not perform this test.

So alter the check to only apply on PATA devices, so that SATA devices
can run at full UDMA speeds.

Change-Id: Id7aa25f2a702c0af73d707395439d69da1e04719
This commit is contained in:
Solomon Peachy 2025-02-10 09:19:07 -05:00
parent 8cc937f33a
commit 0a2a90c182
2 changed files with 2 additions and 2 deletions

View file

@ -959,7 +959,7 @@ static int set_features(void)
if (identify_info[53] & (1<<2)) {
int max_udma = ATA_MAX_UDMA;
#if ATA_MAX_UDMA > 2
if (!(identify_info[93] & (1<<13)))
if (!identify_info[76] && !(identify_info[93] & (1<<13))) /* w93b13 is only valid for PATA, w76 is 0 PATA */
max_udma = 2;
#endif
/* Ultra DMA mode info present, find a mode */

View file

@ -726,7 +726,7 @@ static int ata_power_up(void)
{
int max_udma = ATA_MAX_UDMA;
#if ATA_MAX_UDMA > 2
if (!(identify_info[93] & BIT(13)))
if (!identify_info[76] && !(identify_info[93] & BIT(13))) /* w93b13 is only valid for PATA, w76 is 0 PATA */
max_udma = 2;
#endif
param = ata_get_best_mode(identify_info[88], max_udma, 0x40);