diff options
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 14f1e9506338..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), |
@@ -1238,15 +1241,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1238 | if (rc) | 1241 | if (rc) |
1239 | return rc; | 1242 | return rc; |
1240 | 1243 | ||
1241 | /* AHCI controllers often implement SFF compatible interface. | ||
1242 | * Grab all PCI BARs just in case. | ||
1243 | */ | ||
1244 | rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME); | ||
1245 | if (rc == -EBUSY) | ||
1246 | pcim_pin_device(pdev); | ||
1247 | if (rc) | ||
1248 | return rc; | ||
1249 | |||
1250 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && | 1244 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && |
1251 | (pdev->device == 0x2652 || pdev->device == 0x2653)) { | 1245 | (pdev->device == 0x2652 || pdev->device == 0x2653)) { |
1252 | u8 map; | 1246 | u8 map; |
@@ -1263,6 +1257,15 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1263 | } | 1257 | } |
1264 | } | 1258 | } |
1265 | 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 | |||
1266 | hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); | 1269 | hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); |
1267 | if (!hpriv) | 1270 | if (!hpriv) |
1268 | return -ENOMEM; | 1271 | return -ENOMEM; |