aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index e2903d03180e..e3a92a6da39a 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -427,6 +427,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
427 .driver_data = board_ahci_yes_fbs }, /* 88se9128 */ 427 .driver_data = board_ahci_yes_fbs }, /* 88se9128 */
428 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9125), 428 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9125),
429 .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ 429 .driver_data = board_ahci_yes_fbs }, /* 88se9125 */
430 { PCI_DEVICE_SUB(PCI_VENDOR_ID_MARVELL_EXT, 0x9178,
431 PCI_VENDOR_ID_MARVELL_EXT, 0x9170),
432 .driver_data = board_ahci_yes_fbs }, /* 88se9170 */
430 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a), 433 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a),
431 .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ 434 .driver_data = board_ahci_yes_fbs }, /* 88se9172 */
432 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172), 435 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172),
@@ -435,6 +438,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
435 .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ 438 .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */
436 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), 439 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3),
437 .driver_data = board_ahci_yes_fbs }, 440 .driver_data = board_ahci_yes_fbs },
441 { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9230),
442 .driver_data = board_ahci_yes_fbs },
438 443
439 /* Promise */ 444 /* Promise */
440 { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ 445 { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
@@ -1236,15 +1241,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1236 if (rc) 1241 if (rc)
1237 return rc; 1242 return rc;
1238 1243
1239 /* AHCI controllers often implement SFF compatible interface.
1240 * Grab all PCI BARs just in case.
1241 */
1242 rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME);
1243 if (rc == -EBUSY)
1244 pcim_pin_device(pdev);
1245 if (rc)
1246 return rc;
1247
1248 if (pdev->vendor == PCI_VENDOR_ID_INTEL && 1244 if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
1249 (pdev->device == 0x2652 || pdev->device == 0x2653)) { 1245 (pdev->device == 0x2652 || pdev->device == 0x2653)) {
1250 u8 map; 1246 u8 map;
@@ -1261,6 +1257,15 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1261 } 1257 }
1262 } 1258 }
1263 1259
1260 /* AHCI controllers often implement SFF compatible interface.
1261 * Grab all PCI BARs just in case.
1262 */
1263 rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME);
1264 if (rc == -EBUSY)
1265 pcim_pin_device(pdev);
1266 if (rc)
1267 return rc;
1268
1264 hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); 1269 hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
1265 if (!hpriv) 1270 if (!hpriv)
1266 return -ENOMEM; 1271 return -ENOMEM;