mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers
authorManuel Lauss <manuel.lauss@googlemail.com>
Thu, 29 Mar 2012 17:05:04 +0000 (19:05 +0200)
committerChris Ball <cjb@laptop.org>
Fri, 6 Apr 2012 00:32:25 +0000 (20:32 -0400)
MSI on my O2Micro OZ600 SD card reader is broken.  This patch adds a quirk
to disable MSI on these controllers.

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-pci.c
include/linux/mmc/sdhci.h

index fbbebe251e016cf8b24906aa6a0b4ad31f64cd40..9303f7fc1e6847342bc9a416b80aff3b07816a89 100644 (file)
@@ -561,6 +561,7 @@ static int jmicron_resume(struct sdhci_pci_chip *chip)
 
 static const struct sdhci_pci_fixes sdhci_o2 = {
        .probe          = o2_probe,
+       .quirks2        = SDHCI_QUIRK2_BROKEN_MSI,
 };
 
 static const struct sdhci_pci_fixes sdhci_jmicron = {
@@ -1418,7 +1419,8 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev,
 
        slots = chip->num_slots;        /* Quirk may have changed this */
 
-       pci_enable_msi(pdev);
+       if (!(chip->quirks2 & SDHCI_QUIRK2_BROKEN_MSI))
+               pci_enable_msi(pdev);
 
        for (i = 0; i < slots; i++) {
                slot = sdhci_pci_probe_slot(pdev, chip, first_bar, i);
index e9051e1cb1ce38434d0443cfee5c7c74e43a1967..9752fe434ae9832380e61826bf3ae71598b7126a 100644 (file)
@@ -91,6 +91,8 @@ struct sdhci_host {
        unsigned int quirks2;   /* More deviations from spec. */
 
 #define SDHCI_QUIRK2_HOST_OFF_CARD_ON                  (1<<0)
+/* broken MSI Interrupts */
+#define SDHCI_QUIRK2_BROKEN_MSI                                (1<<1)
 
        int irq;                /* Device IRQ */
        void __iomem *ioaddr;   /* Mapped address */