aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-20 23:16:56 -0400
committerTejun Heo <tj@kernel.org>2009-04-20 23:16:56 -0400
commit2ecf0a57c60dcb588f310d94412118e15c510532 (patch)
tree0491672f5c24b7a73493510eb5572c1ac034cb00
parent2c316bb57ad4e9f0f3de2d7ef1ae85530c2a7e69 (diff)
ide-dma: don't reset request fields on dma_timeout_retry()
Impact: drop unnecessary code Now that everything uses bio and block operations, there is no need to reset request fields manually when retrying a request. Every field is guaranteed to be always valid. Drop unnecessary request field resetting from ide_dma_timeout_retry(). Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--drivers/ide/ide-dma.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index a0b8cab1d9a6..d9123ecae4a9 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -510,23 +510,11 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
510 /* 510 /*
511 * un-busy drive etc and make sure request is sane 511 * un-busy drive etc and make sure request is sane
512 */ 512 */
513
514 rq = hwif->rq; 513 rq = hwif->rq;
515 if (!rq) 514 if (rq) {
516 goto out; 515 hwif->rq = NULL;
517 516 rq->errors = 0;
518 hwif->rq = NULL; 517 }
519
520 rq->errors = 0;
521
522 if (!rq->bio)
523 goto out;
524
525 rq->sector = rq->bio->bi_sector;
526 rq->current_nr_sectors = bio_iovec(rq->bio)->bv_len >> 9;
527 rq->hard_cur_sectors = rq->current_nr_sectors;
528 rq->buffer = bio_data(rq->bio);
529out:
530 return ret; 518 return ret;
531} 519}
532 520