Skip to content

Commit

Permalink
mmc: at91_mci: disable handling of blocks with size not multiple of 4…
Browse files Browse the repository at this point in the history
… bytes

This kind of transfer is not supported, so don't advertise it and make it
fail early.

Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
  • Loading branch information
Marc Pignat authored and Pierre Ossman committed Sep 23, 2007
1 parent 8fdd852 commit 1d4de9e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/mmc/host/at91_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1d4de9e

Please sign in to comment.