diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/pci/jmicron.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index 53f25500c22b..be4fc96c29e0 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -240,12 +240,31 @@ static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_devi | |||
240 | return 0; | 240 | return 0; |
241 | } | 241 | } |
242 | 242 | ||
243 | /* If libata is configured, jmicron PCI quirk will configure it such | ||
244 | * that the SATA ports are in AHCI function while the PATA ports are | ||
245 | * in a separate IDE function. In such cases, match device class and | ||
246 | * attach only to IDE. If libata isn't configured, keep the old | ||
247 | * behavior for backward compatibility. | ||
248 | */ | ||
249 | #if defined(CONFIG_ATA) || defined(CONFIG_ATA_MODULE) | ||
250 | #define JMB_CLASS PCI_CLASS_STORAGE_IDE << 8 | ||
251 | #define JMB_CLASS_MASK 0xffff00 | ||
252 | #else | ||
253 | #define JMB_CLASS 0 | ||
254 | #define JMB_CLASS_MASK 0 | ||
255 | #endif | ||
256 | |||
243 | static struct pci_device_id jmicron_pci_tbl[] = { | 257 | static struct pci_device_id jmicron_pci_tbl[] = { |
244 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 258 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, |
245 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 259 | PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 0}, |
246 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, | 260 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, |
247 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, | 261 | PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 1}, |
248 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, | 262 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, |
263 | PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 2}, | ||
264 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, | ||
265 | PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 3}, | ||
266 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, | ||
267 | PCI_ANY_ID, PCI_ANY_ID, JMB_CLASS, JMB_CLASS_MASK, 4}, | ||
249 | { 0, }, | 268 | { 0, }, |
250 | }; | 269 | }; |
251 | 270 | ||