aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/card/block.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-05-23 23:18:40 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-05-23 23:18:40 +0100
commitfc05505b77f7900a1bb74fb3f3a4343dee4265a4 (patch)
tree6517919cb60bd9465078512cacbefd8c77f94b76 /drivers/mmc/card/block.c
parenta2ab67fae1ab9226679495a8d260f4e6555efc5f (diff)
parent11c79740d3c03cb81f84e98cf2e2dbd8d9bb53cd (diff)
Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 into devel
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r--drivers/mmc/card/block.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index fe8041e619e..b25e9b6516a 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -254,6 +254,14 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
brq.data.blocks = req->nr_sectors;
/*
+ * The block layer doesn't support all sector count
+ * restrictions, so we need to be prepared for too big
+ * requests.
+ */
+ if (brq.data.blocks > card->host->max_blk_count)
+ brq.data.blocks = card->host->max_blk_count;
+
+ /*
* After a read error, we redo the request one sector at a time
* in order to accurately determine which sectors can be read
* successfully.