aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-28 16:51:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-28 16:51:32 -0500
commitf0f0052069989b80d2a3e50c9cd2f2a650bc1aea (patch)
tree40ff39bc341aed8318a54d1bd61a381f41844f71 /drivers/mmc
parent68fbda7de07e56eb90dd6e58a162527411b388b1 (diff)
parenta65b58663d983e588aed8d1bfc75edaac2527fa7 (diff)
Merge branch 'blk-end-request' of git://git.kernel.dk/linux-2.6-block
* 'blk-end-request' of git://git.kernel.dk/linux-2.6-block: (30 commits) blk_end_request: changing xsysace (take 4) blk_end_request: changing ub (take 4) blk_end_request: cleanup of request completion (take 4) blk_end_request: cleanup 'uptodate' related code (take 4) blk_end_request: remove/unexport end_that_request_* (take 4) blk_end_request: changing scsi (take 4) blk_end_request: add bidi completion interface (take 4) blk_end_request: changing ide-cd (take 4) blk_end_request: add callback feature (take 4) blk_end_request: changing ide normal caller (take 4) blk_end_request: changing cpqarray (take 4) blk_end_request: changing cciss (take 4) blk_end_request: changing ide-scsi (take 4) blk_end_request: changing s390 (take 4) blk_end_request: changing mmc (take 4) blk_end_request: changing i2o_block (take 4) blk_end_request: changing viocd (take 4) blk_end_request: changing xen-blkfront (take 4) blk_end_request: changing viodasd (take 4) blk_end_request: changing sx8 (take 4) ...
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/block.c24
-rw-r--r--drivers/mmc/card/queue.c4
2 files changed, 7 insertions, 21 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index aeb32a93f6a0..91ded3e82401 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -348,15 +348,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
348 * A block was successfully transferred. 348 * A block was successfully transferred.
349 */ 349 */
350 spin_lock_irq(&md->lock); 350 spin_lock_irq(&md->lock);
351 ret = end_that_request_chunk(req, 1, brq.data.bytes_xfered); 351 ret = __blk_end_request(req, 0, brq.data.bytes_xfered);
352 if (!ret) {
353 /*
354 * The whole request completed successfully.
355 */
356 add_disk_randomness(req->rq_disk);
357 blkdev_dequeue_request(req);
358 end_that_request_last(req, 1);
359 }
360 spin_unlock_irq(&md->lock); 352 spin_unlock_irq(&md->lock);
361 } while (ret); 353 } while (ret);
362 354
@@ -386,27 +378,21 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
386 else 378 else
387 bytes = blocks << 9; 379 bytes = blocks << 9;
388 spin_lock_irq(&md->lock); 380 spin_lock_irq(&md->lock);
389 ret = end_that_request_chunk(req, 1, bytes); 381 ret = __blk_end_request(req, 0, bytes);
390 spin_unlock_irq(&md->lock); 382 spin_unlock_irq(&md->lock);
391 } 383 }
392 } else if (rq_data_dir(req) != READ && 384 } else if (rq_data_dir(req) != READ &&
393 (card->host->caps & MMC_CAP_MULTIWRITE)) { 385 (card->host->caps & MMC_CAP_MULTIWRITE)) {
394 spin_lock_irq(&md->lock); 386 spin_lock_irq(&md->lock);
395 ret = end_that_request_chunk(req, 1, brq.data.bytes_xfered); 387 ret = __blk_end_request(req, 0, brq.data.bytes_xfered);
396 spin_unlock_irq(&md->lock); 388 spin_unlock_irq(&md->lock);
397 } 389 }
398 390
399 mmc_release_host(card->host); 391 mmc_release_host(card->host);
400 392
401 spin_lock_irq(&md->lock); 393 spin_lock_irq(&md->lock);
402 while (ret) { 394 while (ret)
403 ret = end_that_request_chunk(req, 0, 395 ret = __blk_end_request(req, -EIO, blk_rq_cur_bytes(req));
404 req->current_nr_sectors << 9);
405 }
406
407 add_disk_randomness(req->rq_disk);
408 blkdev_dequeue_request(req);
409 end_that_request_last(req, 0);
410 spin_unlock_irq(&md->lock); 396 spin_unlock_irq(&md->lock);
411 397
412 return 0; 398 return 0;
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 30cd13b13ac3..7731ddefdc1b 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -94,8 +94,8 @@ static void mmc_request(struct request_queue *q)
94 printk(KERN_ERR "MMC: killing requests for dead queue\n"); 94 printk(KERN_ERR "MMC: killing requests for dead queue\n");
95 while ((req = elv_next_request(q)) != NULL) { 95 while ((req = elv_next_request(q)) != NULL) {
96 do { 96 do {
97 ret = end_that_request_chunk(req, 0, 97 ret = __blk_end_request(req, -EIO,
98 req->current_nr_sectors << 9); 98 blk_rq_cur_bytes(req));
99 } while (ret); 99 } while (ret);
100 } 100 }
101 return; 101 return;