]> git.hungrycats.org Git - linux/commitdiff
[PATCH] JMB 368 PATA detection
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Sat, 28 Oct 2006 17:38:57 +0000 (10:38 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 4 Nov 2006 01:33:50 +0000 (17:33 -0800)
The Jmicron JMB368 is PATA only so has the PATA on function zero.  Don't
therefore skip function zero on this device when probing

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/ide/pci/generic.c

index 6a1ddad25b26ed19b47d881f9124e686d9d2735b..58e8efaf03f714b5988bb905dd2ff80b4365d7c2 100644 (file)
@@ -242,8 +242,10 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
            (!(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);