aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/generic.c')
-rw-r--r--drivers/ide/pci/generic.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
index 965c43659e35..9f306880491a 100644
--- a/drivers/ide/pci/generic.c
+++ b/drivers/ide/pci/generic.c
@@ -40,6 +40,19 @@
40 40
41static int ide_generic_all; /* Set to claim all devices */ 41static int ide_generic_all; /* Set to claim all devices */
42 42
43/*
44 * the module_param_named() was added for the modular case
45 * the __setup() is left as compatibility for existing setups
46 */
47#ifndef MODULE
48static int __init ide_generic_all_on(char *unused)
49{
50 ide_generic_all = 1;
51 printk(KERN_INFO "IDE generic will claim all unknown PCI IDE storage controllers.\n");
52 return 1;
53}
54__setup("all-generic-ide", ide_generic_all_on);
55#endif
43module_param_named(all_generic_ide, ide_generic_all, bool, 0444); 56module_param_named(all_generic_ide, ide_generic_all, bool, 0444);
44MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers."); 57MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers.");
45 58
@@ -234,13 +247,17 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
234 (!(PCI_FUNC(dev->devfn) & 1))) 247 (!(PCI_FUNC(dev->devfn) & 1)))
235 goto out; 248 goto out;
236 249
237 if (dev->vendor == PCI_VENDOR_ID_JMICRON && PCI_FUNC(dev->devfn) != 1) 250 if (dev->vendor == PCI_VENDOR_ID_JMICRON) {
238 goto out; 251 if (dev->device != PCI_DEVICE_ID_JMICRON_JMB368 && PCI_FUNC(dev->devfn) != 1)
252 goto out;
253 }
239 254
240 pci_read_config_word(dev, PCI_COMMAND, &command); 255 if (dev->vendor != PCI_VENDOR_ID_JMICRON) {
241 if (!(command & PCI_COMMAND_IO)) { 256 pci_read_config_word(dev, PCI_COMMAND, &command);
242 printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name); 257 if (!(command & PCI_COMMAND_IO)) {
243 goto out; 258 printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
259 goto out;
260 }
244 } 261 }
245 ret = ide_setup_pci_device(dev, d); 262 ret = ide_setup_pci_device(dev, d);
246out: 263out: