mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* amd74xx cable detect.
@ 2003-03-24 16:41 davej
  0 siblings, 0 replies; only message in thread
From: davej @ 2003-03-24 16:41 UTC (permalink / raw)
  To: alan; +Cc: linux-kernel

A patch from a few weeks back, that seemed to not get
any attention. Currently the cable detection is based upon
reads from an uninitialised variable.


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/ide/pci/amd74xx.c linux-2.5/drivers/ide/pci/amd74xx.c
--- bk-linus/drivers/ide/pci/amd74xx.c	2003-03-22 12:36:22.000000000 +0000
+++ linux-2.5/drivers/ide/pci/amd74xx.c	2003-03-22 12:41:47.000000000 +0000
@@ -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");

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-24 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-24 16:41 amd74xx cable detect davej

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®