All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers
@ 2012-03-29 17:05 Manuel Lauss
  2012-04-01  4:25 ` Chris Ball
  0 siblings, 1 reply; 2+ messages in thread
From: Manuel Lauss @ 2012-03-29 17:05 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Alexander Stein, Manuel Lauss

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>
---
 drivers/mmc/host/sdhci-pci.c |    4 +++-
 include/linux/mmc/sdhci.h    |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index fbbebe2..9303f7f 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -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);
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index e9051e1..9752fe4 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -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 */
-- 
1.7.8.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-01  4:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-29 17:05 [PATCH] mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers Manuel Lauss
2012-04-01  4:25 ` Chris Ball

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.