From: Marc Pignat Date: Thu, 9 Aug 2007 11:56:29 +0000 (+0200) Subject: mmc: at91_mci: disable handling of blocks with size not multiple of 4 bytes X-Git-Tag: v2.6.24-rc1~1464^2~59 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1d4de9edd6c9ad676b20729ab15c04b78e9a50c5;p=linux-2.6-omap-h63xx.git mmc: at91_mci: disable handling of blocks with size not multiple of 4 bytes This kind of transfer is not supported, so don't advertise it and make it fail early. Signed-off-by: Marc Pignat Signed-off-by: Pierre Ossman --- diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 8ec31780234..6ba98a49612 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -428,6 +428,14 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command } if (data) { + + if ( data->blksz & 0x3 ) { + pr_debug("Unsupported block size\n"); + cmd->error = -EINVAL; + mmc_request_done(host->mmc, host->request); + return; + } + block_length = data->blksz; blocks = data->blocks;