From 55436e613b407a27097704e4054491d545df177c Mon Sep 17 00:00:00 2001 From: Olof Johansson Date: Sat, 1 Jan 2011 18:37:32 -0600 Subject: [PATCH] --- yaml --- r: 228907 b: refs/heads/master c: 30652aa36b58d57fcc1a0acce51e391bbb6edf5e h: refs/heads/master i: 228905: a82741e77f736b36ea6cf8add4ea6a7102d979ae 228903: 78f0576e96c25141fb0d62dde8c499398b705c2c v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/sdhci.c | 10 +++++++--- trunk/include/linux/mmc/sdhci.h | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 439f9667c393..d780b1e510fe 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c288b85554097a3d1271f935c48b442280b2db9e +refs/heads/master: 30652aa36b58d57fcc1a0acce51e391bbb6edf5e diff --git a/trunk/drivers/mmc/host/sdhci.c b/trunk/drivers/mmc/host/sdhci.c index d5febe584b05..9e15f41f87be 100644 --- a/trunk/drivers/mmc/host/sdhci.c +++ b/trunk/drivers/mmc/host/sdhci.c @@ -1949,10 +1949,14 @@ int sdhci_add_host(struct sdhci_host *host) * of bytes. When doing hardware scatter/gather, each entry cannot * be larger than 64 KiB though. */ - if (host->flags & SDHCI_USE_ADMA) - mmc->max_seg_size = 65536; - else + if (host->flags & SDHCI_USE_ADMA) { + if (host->quirks & SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC) + mmc->max_seg_size = 65535; + else + mmc->max_seg_size = 65536; + } else { mmc->max_seg_size = mmc->max_req_size; + } /* * Maximum block size. This varies from controller to controller and diff --git a/trunk/include/linux/mmc/sdhci.h b/trunk/include/linux/mmc/sdhci.h index 0d953f513d81..83bd9f76709a 100644 --- a/trunk/include/linux/mmc/sdhci.h +++ b/trunk/include/linux/mmc/sdhci.h @@ -83,6 +83,8 @@ struct sdhci_host { #define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 (1<<28) /* Controller doesn't have HISPD bit field in HI-SPEED SD card */ #define SDHCI_QUIRK_NO_HISPD_BIT (1<<29) +/* Controller treats ADMA descriptors with length 0000h incorrectly */ +#define SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC (1<<30) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */