From: JosephChan@via.com.tw Date: Thu, 25 Mar 2010 12:51:47 +0000 (+0800) Subject: pata_via: fix VT6410/6415/6330 detection issue X-Git-Tag: v2.6.34-rc3~8^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bc8a67386fd462914269fa93446e1891955a8bb3;p=karo-tx-linux.git pata_via: fix VT6410/6415/6330 detection issue 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 95d39c36acea..c59b40710fbd 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c @@ -576,6 +576,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; }