Skip to contentSkip to conversation

ide-generic: jmicron fix

PATCH New Alan Cox 1 participant 1 message Oct 3, 2006

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 ide-generic: jmicron fix

Some people find their Jmicron pata port reports its disabled even though it has devices on it and was boot probed. Fix this

(Candidate for 2.6.18.*, less so for 2.6.19 as we've got a proper jmicron driver on the merge for that to replace ide-generic support)

drivers/ide/pci/generic.c +7 -5
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-mm3/drivers/ide/pci/generic.c linux-2.6.18-mm3/drivers/ide/pci/generic.c
@@ -236,11 +236,13 @@
 
 	if (dev->vendor == PCI_VENDOR_ID_JMICRON && PCI_FUNC(dev->devfn) != 1)
 		goto out;
-
-	pci_read_config_word(dev, PCI_COMMAND, &command);
-	if (!(command & PCI_COMMAND_IO)) {
-		printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
-		goto out;
+	
+	if (dev->vendor != PCI_VENDOR_ID_JMICRON) {
+		pci_read_config_word(dev, PCI_COMMAND, &command);
+		if (!(command & PCI_COMMAND_IO)) {
+			printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
+			goto out;
+		}
 	}
 	ret = ide_setup_pci_device(dev, d);
 out: