aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r--drivers/scsi/ahci.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 7447ba0374e8..77e7202a0eba 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -1323,6 +1323,17 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1323 if (!printed_version++) 1323 if (!printed_version++)
1324 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); 1324 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
1325 1325
1326 /* JMicron-specific fixup: make sure we're in AHCI mode */
1327 /* This is protected from races with ata_jmicron by the pci probe
1328 locking */
1329 if (pdev->vendor == PCI_VENDOR_ID_JMICRON) {
1330 /* AHCI enable, AHCI on function 0 */
1331 pci_write_config_byte(pdev, 0x41, 0xa1);
1332 /* Function 1 is the PATA controller */
1333 if (PCI_FUNC(pdev->devfn))
1334 return -ENODEV;
1335 }
1336
1326 rc = pci_enable_device(pdev); 1337 rc = pci_enable_device(pdev);
1327 if (rc) 1338 if (rc)
1328 return rc; 1339 return rc;
@@ -1378,10 +1389,6 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1378 if (have_msi) 1389 if (have_msi)
1379 hpriv->flags |= AHCI_FLAG_MSI; 1390 hpriv->flags |= AHCI_FLAG_MSI;
1380 1391
1381 /* JMicron-specific fixup: make sure we're in AHCI mode */
1382 if (pdev->vendor == 0x197b)
1383 pci_write_config_byte(pdev, 0x41, 0xa1);
1384
1385 /* initialize adapter */ 1392 /* initialize adapter */
1386 rc = ahci_host_init(probe_ent); 1393 rc = ahci_host_init(probe_ent);
1387 if (rc) 1394 if (rc)