[PATCH RFC 3/5] mmc: mmci: relax blksz check for SDIO

From: Srinivas Kandagatla
Date: Tue Aug 12 2014 - 08:05:04 EST


From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>

This patch adds condition in mmci_validate_data to skip checking
blocksize for SDIO card types. SDIO card type can issue blocksizes
which are not exactly power of 2 so this check always fails, resulting
in SDIO failures.

Relaxing this check for SDIO in mmci_validate_data solves the issue
encountered during WLAN ath6kl testing with Qualcomm APQ8064 SOC on
IFC6410 board.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
---
drivers/mmc/host/mmci.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 99fe80a..747aba0 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -240,6 +240,10 @@ static int mmci_validate_data(struct mmci_host *host,
if (!data)
return 0;

+ /* sdio could have sizes which are not power of 2 */
+ if (host->mmc->card && mmc_card_sdio(host->mmc->card))
+ return 0;
+
if (!is_power_of_2(data->blksz)) {
dev_err(mmc_dev(host->mmc),
"unsupported block size (%d bytes)\n", data->blksz);
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/