From: Chris Ball <cjb@laptop.org>
To: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: linux-mmc@vger.kernel.org
Subject: Re: [PATCH v2] mmc: sdhci-pci: add quirk for broken MSI on O2Micro ctrls.
Date: Sun, 01 Apr 2012 11:11:17 -0400 [thread overview]
Message-ID: <874nt3lc6i.fsf@laptop.org> (raw)
In-Reply-To: <1333284372-4256-1-git-send-email-manuel.lauss@googlemail.com> (Manuel Lauss's message of "Sun, 1 Apr 2012 14:46:12 +0200")
Hi,
On Sun, Apr 01 2012, Manuel Lauss wrote:
> 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>
> ---
> v2: also wrap pci_disable_msi() calls as requested by Chris Ball.
>
> drivers/mmc/host/sdhci-pci.c | 10 +++++++---
> include/linux/mmc/sdhci.h | 2 ++
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
> index fbbebe2..5439b18 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);
> @@ -1438,7 +1440,8 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev,
> return 0;
>
> free:
> - pci_disable_msi(pdev);
> + if (!(chip->quirks2 & SDHCI_QUIRK2_BROKEN_MSI))
> + pci_disable_msi(pdev);
>
> pci_set_drvdata(pdev, NULL);
> kfree(chip);
> @@ -1462,7 +1465,8 @@ static void __devexit sdhci_pci_remove(struct pci_dev *pdev)
> for (i = 0; i < chip->num_slots; i++)
> sdhci_pci_remove_slot(chip->slots[i]);
>
> - pci_disable_msi(pdev);
> + if (!(chip->quirks2 & SDHCI_QUIRK2_BROKEN_MSI))
> + pci_disable_msi(pdev);
>
> pci_set_drvdata(pdev, NULL);
> kfree(chip);
> 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 */
Thanks, pushed to mmc-next for 3.4.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
prev parent reply other threads:[~2012-04-01 15:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-01 12:46 [PATCH v2] mmc: sdhci-pci: add quirk for broken MSI on O2Micro ctrls Manuel Lauss
2012-04-01 15:11 ` Chris Ball [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874nt3lc6i.fsf@laptop.org \
--to=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=manuel.lauss@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.