Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c168e3db7d900008ee304574057e0dc1a8505af
Commit:     7c168e3db7d900008ee304574057e0dc1a8505af
Parent:     56e71efe44eb06ae1761f43cca70a5f3cc54c0fb
Author:     Feng Tang <[EMAIL PROTECTED]>
AuthorDate: Sun Sep 30 12:44:18 2007 +0200
Committer:  Pierre Ossman <[EMAIL PROTECTED]>
CommitDate: Wed Oct 3 18:40:33 2007 +0200

    sdhci: add SDHCI_QUIRK_BROKEN_DMA quirk
    
    Some controllers like ENE712 can't work properly with DMA mode,
    add this quirk to force these kinds of HW work with PIO mode
    
    Signed-off-by: Feng Tang <[EMAIL PROTECTED]>
    Signed-off-by: Pierre Ossman <[EMAIL PROTECTED]>
---
 drivers/mmc/host/sdhci.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 866528c..2b4a86c 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -35,6 +35,7 @@ static unsigned int debug_quirks = 0;
 #define SDHCI_QUIRK_NO_CARD_NO_RESET                   (1<<2)
 #define SDHCI_QUIRK_SINGLE_POWER_WRITE                 (1<<3)
 #define SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS              (1<<4)
+#define SDHCI_QUIRK_BROKEN_DMA                         (1<<5)
 
 static const struct pci_device_id pci_ids[] __devinitdata = {
        {
@@ -68,7 +69,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
                .device         = PCI_DEVICE_ID_ENE_CB712_SD,
                .subvendor      = PCI_ANY_ID,
                .subdevice      = PCI_ANY_ID,
-               .driver_data    = SDHCI_QUIRK_SINGLE_POWER_WRITE,
+               .driver_data    = SDHCI_QUIRK_SINGLE_POWER_WRITE |
+                                 SDHCI_QUIRK_BROKEN_DMA,
        },
 
        {
@@ -76,7 +78,8 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
                .device         = PCI_DEVICE_ID_ENE_CB712_SD_2,
                .subvendor      = PCI_ANY_ID,
                .subdevice      = PCI_ANY_ID,
-               .driver_data    = SDHCI_QUIRK_SINGLE_POWER_WRITE,
+               .driver_data    = SDHCI_QUIRK_SINGLE_POWER_WRITE |
+                                 SDHCI_QUIRK_BROKEN_DMA,
        },
 
        {
@@ -1304,6 +1307,12 @@ static int __devinit sdhci_probe_slot(struct pci_dev 
*pdev, int slot)
        else
                host->flags |= SDHCI_USE_DMA;
 
+       if ((chip->quirks & SDHCI_QUIRK_BROKEN_DMA) &&
+               (host->flags & SDHCI_USE_DMA)) {
+               DBG("Disabling DMA as it is marked broken");
+               host->flags &= ~SDHCI_USE_DMA;
+       }
+
        if (((pdev->class & 0x0000FF) != PCI_SDHCI_IFDMA) &&
                (host->flags & SDHCI_USE_DMA)) {
                printk(KERN_WARNING "%s: Will use DMA "
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to