]> git.itanic.dy.fi Git - linux-stable/commitdiff
ide-generic: jmicron fix
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Thu, 5 Oct 2006 21:39:26 +0000 (14:39 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Oct 2006 20:23:28 +0000 (13:23 -0700)
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)

From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ide/pci/generic.c

index 78810ba982e9efb17b6713c1a12d480ec4e77491..6a1ddad25b26ed19b47d881f9124e686d9d2735b 100644 (file)
@@ -245,10 +245,12 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
        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: