diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-atapi.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 2874c3d703a9..8a894fa37b53 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -269,7 +269,7 @@ void ide_retry_pc(ide_drive_t *drive) | |||
269 | blk_requeue_request(failed_rq->q, failed_rq); | 269 | blk_requeue_request(failed_rq->q, failed_rq); |
270 | drive->hwif->rq = NULL; | 270 | drive->hwif->rq = NULL; |
271 | if (ide_queue_sense_rq(drive, pc)) { | 271 | if (ide_queue_sense_rq(drive, pc)) { |
272 | blkdev_dequeue_request(failed_rq); | 272 | blk_start_request(failed_rq); |
273 | ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq)); | 273 | ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq)); |
274 | } | 274 | } |
275 | } | 275 | } |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index abda7337b3f4..e4e3a0e3201e 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -519,11 +519,8 @@ repeat: | |||
519 | * we know that the queue isn't empty, but this can happen | 519 | * we know that the queue isn't empty, but this can happen |
520 | * if the q->prep_rq_fn() decides to kill a request | 520 | * if the q->prep_rq_fn() decides to kill a request |
521 | */ | 521 | */ |
522 | if (!rq) { | 522 | if (!rq) |
523 | rq = elv_next_request(drive->queue); | 523 | rq = blk_fetch_request(drive->queue); |
524 | if (rq) | ||
525 | blkdev_dequeue_request(rq); | ||
526 | } | ||
527 | 524 | ||
528 | spin_unlock_irq(q->queue_lock); | 525 | spin_unlock_irq(q->queue_lock); |
529 | spin_lock_irq(&hwif->lock); | 526 | spin_lock_irq(&hwif->lock); |
@@ -536,7 +533,7 @@ repeat: | |||
536 | /* | 533 | /* |
537 | * Sanity: don't accept a request that isn't a PM request | 534 | * Sanity: don't accept a request that isn't a PM request |
538 | * if we are currently power managed. This is very important as | 535 | * if we are currently power managed. This is very important as |
539 | * blk_stop_queue() doesn't prevent the elv_next_request() | 536 | * blk_stop_queue() doesn't prevent the blk_fetch_request() |
540 | * above to return us whatever is in the queue. Since we call | 537 | * above to return us whatever is in the queue. Since we call |
541 | * ide_do_request() ourselves, we end up taking requests while | 538 | * ide_do_request() ourselves, we end up taking requests while |
542 | * the queue is blocked... | 539 | * the queue is blocked... |