@@ -1339,12 +1339,17 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
host->quirks = chip->quirks;
host->quirks2 = chip->quirks2;
+ ret = pci_enable_msi(pdev);
+ if (ret) {
+ dev_err(&pdev->dev, "cannot enable msi\n");
+ goto cleanup;
+ }
host->irq = pdev->irq;
ret = pci_request_region(pdev, bar, mmc_hostname(host->mmc));
if (ret) {
dev_err(&pdev->dev, "cannot request region\n");
- goto cleanup;
+ goto disable_msi;
}
host->ioaddr = pci_ioremap_bar(pdev, bar);
@@ -1396,6 +1401,9 @@ unmap:
release:
pci_release_region(pdev, bar);
+disable_msi:
+ pci_disable_msi(pdev);
+
cleanup:
if (slot->data && slot->data->cleanup)
slot->data->cleanup(slot->data);
@@ -1431,6 +1439,8 @@ static void sdhci_pci_remove_slot(struct sdhci_pci_slot *slot)
pci_release_region(slot->chip->pdev, slot->pci_bar);
+ pci_disable_msi(slot->chip->pdev);
+
sdhci_free_host(slot->host);
}