Skip to contentSkip to conversation

Incorrect AMD74xx UDMA100 test.

PATCH [email protected] 2 participants 2 messages May 15, 2003 – May 16, 2003

lore
Share & tools
lore
#0 lore raw

We do 80wire comparisons based on an uninitialised var. Shouldn't we also be doing the 80wire check on the UDMA66 case ?

drivers/ide/pci/amd74xx.c +2 -1
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/ide/pci/amd74xx.c linux-2.5/drivers/ide/pci/amd74xx.c
@@ -313,7 +313,8 @@ static unsigned int __init init_chipset_
 
 		case AMD_UDMA_100:
 			pci_read_config_byte(dev, AMD_CABLE_DETECT, &t);
-			amd_80w = ((u & 0x3) ? 1 : 0) | ((u & 0xc) ? 2 : 0);
+			amd_80w = ((t & 0x3) ? 1 : 0) | ((t & 0xc) ? 2 : 0);
+			pci_read_config_dword(dev, AMD_UDMA_TIMING, &u);
 			for (i = 24; i >= 0; i -= 8)
 				if (((u >> i) & 4) && !(amd_80w & (1 << (1 - (i >> 4))))) {
 					printk(KERN_WARNING "AMD_IDE: Bios didn't set cable bits correctly. Enabling workaround.\n");
#1 lore raw
Quoted 2 lines

We do 80wire comparisons based on an uninitialised var. Shouldn't we also be doing the 80wire check on the UDMA66 case ?

Yeah I thought that was fixed in 2.5.x and 2.4.x already