git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into for-2.6.31
[safe/jmp/linux-2.6]
/
drivers
/
mmc
/
card
/
block.c
diff --git
a/drivers/mmc/card/block.c
b/drivers/mmc/card/block.c
index
949e997
..
c5df865
100644
(file)
--- 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 = blk_rq_sectors(req);
/*
brq.data.blocks = blk_rq_sectors(req);
/*
+ * 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.
* After a read error, we redo the request one sector at a time
* in order to accurately determine which sectors can be read
* successfully.