aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/block.c
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2007-05-11 18:26:16 -0400
committerPierre Ossman <drzeus@drzeus.cx>2007-07-09 15:22:53 -0400
commit98ccf14909ba02a41c5925b0b2c92aeeef23d3b9 (patch)
tree331b645ee008f858305f7406f4639119b275ff82 /drivers/mmc/card/block.c
parent7dcca30a32aadb0520417521b0c44f42d09fe05c (diff)
mmc: bounce requests for simple hosts
Some hosts cannot do scatter/gather in hardware. Since not doing sg is such a big performance hit, we (optionally) bounce the requests to a simple linear buffer that we hand over to the driver. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r--drivers/mmc/card/block.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 540ff4bea54c..cbd4b6e3e17c 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -262,7 +262,9 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
262 } 262 }
263 263
264 brq.data.sg = mq->sg; 264 brq.data.sg = mq->sg;
265 brq.data.sg_len = blk_rq_map_sg(req->q, req, brq.data.sg); 265 brq.data.sg_len = mmc_queue_map_sg(mq);
266
267 mmc_queue_bounce_pre(mq);
266 268
267 if (brq.data.blocks != 269 if (brq.data.blocks !=
268 (req->nr_sectors >> (md->block_bits - 9))) { 270 (req->nr_sectors >> (md->block_bits - 9))) {
@@ -279,6 +281,9 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
279 } 281 }
280 282
281 mmc_wait_for_req(card->host, &brq.mrq); 283 mmc_wait_for_req(card->host, &brq.mrq);
284
285 mmc_queue_bounce_post(mq);
286
282 if (brq.cmd.error) { 287 if (brq.cmd.error) {
283 printk(KERN_ERR "%s: error %d sending read/write command\n", 288 printk(KERN_ERR "%s: error %d sending read/write command\n",
284 req->rq_disk->disk_name, brq.cmd.error); 289 req->rq_disk->disk_name, brq.cmd.error);