|
@@ -1238,15 +1238,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
if (rc)
|
|
|
return rc;
|
|
|
|
|
|
- /* AHCI controllers often implement SFF compatible interface.
|
|
|
- * Grab all PCI BARs just in case.
|
|
|
- */
|
|
|
- rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME);
|
|
|
- if (rc == -EBUSY)
|
|
|
- pcim_pin_device(pdev);
|
|
|
- if (rc)
|
|
|
- return rc;
|
|
|
-
|
|
|
if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
|
|
|
(pdev->device == 0x2652 || pdev->device == 0x2653)) {
|
|
|
u8 map;
|
|
@@ -1263,6 +1254,15 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /* AHCI controllers often implement SFF compatible interface.
|
|
|
+ * Grab all PCI BARs just in case.
|
|
|
+ */
|
|
|
+ rc = pcim_iomap_regions_request_all(pdev, 1 << ahci_pci_bar, DRV_NAME);
|
|
|
+ if (rc == -EBUSY)
|
|
|
+ pcim_pin_device(pdev);
|
|
|
+ if (rc)
|
|
|
+ return rc;
|
|
|
+
|
|
|
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
|
|
|
if (!hpriv)
|
|
|
return -ENOMEM;
|