Skip to contentSkip to conversation

: JMB 368 PATA detection

PATCH New Alan Cox 1 participant 1 message Oct 27, 2006 libata

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 : JMB 368 PATA detection

The Jmicron JMB368 is PATA only so has the PATA on function zero. Don't therefore skip function zero on this device when probing

drivers/ide/pci/generic.c +4 -2
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.19-rc2-mm1/drivers/ide/pci/generic.c linux-2.6.19-rc2-mm1/drivers/ide/pci/generic.c
@@ -234,8 +234,10 @@
 	    (!(PCI_FUNC(dev->devfn) & 1)))
 		goto out;
 
-	if (dev->vendor == PCI_VENDOR_ID_JMICRON && PCI_FUNC(dev->devfn) != 1)
-		goto out;
+	if (dev->vendor == PCI_VENDOR_ID_JMICRON) {
+		if (dev->device != PCI_DEVICE_ID_JMICRON_JMB368 && PCI_FUNC(dev->devfn) != 1)
+			goto out;
+	}
 
 	if (dev->vendor != PCI_VENDOR_ID_JMICRON) {
 		pci_read_config_word(dev, PCI_COMMAND, &command);