pata_via: fix VT6410/6415/6330 detection issue
authorJosephChan@via.com.tw <JosephChan@via.com.tw>
Thu, 25 Mar 2010 12:51:47 +0000 (20:51 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:02:15 +0000 (16:02 -0700)
commit bc8a67386fd462914269fa93446e1891955a8bb3 upstream.

When using VT6410/6415/6330 chips on some VIA's platforms, the HDD
connection to VT6410/6415/6330 cannot be detected.

It is because the driver detects wrong via_isa_bridge ID, and then
causes this issue to happen.

Signed-off-by: Joseph Chan <josephchan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ata/pata_via.c

index 0d97890af6818ee116c81b2edb474a266ed2ab54..be7c3955298033983b9b4e94123ec48ae84f1534 100644 (file)
@@ -588,6 +588,10 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
                        u8 rev = isa->revision;
                        pci_dev_put(isa);
 
+                       if ((id->device == 0x0415 || id->device == 0x3164) &&
+                           (config->id != id->device))
+                               continue;
+
                        if (rev >= config->rev_min && rev <= config->rev_max)
                                break;
                }