aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_jmicron.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_jmicron.c')
-rw-r--r--drivers/ata/pata_jmicron.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index c40d09206e45..47d0f94fd792 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -202,19 +202,20 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
202 }; 202 };
203 struct ata_port_info *port_info[2] = { &info, &info }; 203 struct ata_port_info *port_info[2] = { &info, &info };
204 204
205 /* PATA controller is fn 1, AHCI is fn 0 */
206 if (id->driver_data != 368 && PCI_FUNC(pdev->devfn) != 1)
207 return -ENODEV;
208
209 return ata_pci_init_one(pdev, port_info, 2); 205 return ata_pci_init_one(pdev, port_info, 2);
210} 206}
211 207
212static const struct pci_device_id jmicron_pci_tbl[] = { 208static const struct pci_device_id jmicron_pci_tbl[] = {
213 { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB361), 361}, 209 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361,
214 { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB363), 363}, 210 PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 361 },
215 { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB365), 365}, 211 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363,
216 { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB366), 366}, 212 PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 363 },
217 { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB368), 368}, 213 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365,
214 PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 365 },
215 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366,
216 PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 366 },
217 { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368,
218 PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 368 },
218 219
219 { } /* terminate list */ 220 { } /* terminate list */
220}; 221};