aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-05-07 22:53:59 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-11 03:52:14 -0400
commit8f6205cd572fece673da0255d74843680f67f879 (patch)
treebb89c1c5fe4436f5a0ec27f0d96074c7031a83ae /drivers/ide/ide-cd.c
parent1011c1b9f2e45ce7c6e38888d2b83936aec38771 (diff)
ide: dequeue in-flight request
ide generally has single request in flight and tracks it using hwif->rq and all state handlers follow the following convention. * ide_started is returned if the request is in flight. * ide_stopped is returned if the queue needs to be restarted. The request might or might not have been processed fully or partially. * hwif->rq is set to NULL, when an issued request completes. So, dequeueing model can be implemented by dequeueing after fetch, requeueing if hwif->rq isn't NULL on ide_stopped return and doing about the same thing on completion / port unlock paths. These changes can be made in ide-io proper. In addition to the above main changes, the following updates are necessary. * ide-cd shouldn't dequeue a request when issuing REQUEST SENSE for it as the request is already dequeued. * ide-atapi uses request queue as stack when issuing REQUEST SENSE to put the REQUEST SENSE in front of the failed request. This now needs to be done using requeueing. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 2eadc9d2e965..4c7792fd5f93 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -405,15 +405,7 @@ static int cdrom_decode_status(ide_drive_t *drive, u8 stat)
405 405
406end_request: 406end_request:
407 if (stat & ATA_ERR) { 407 if (stat & ATA_ERR) {
408 struct request_queue *q = drive->queue;
409 unsigned long flags;
410
411 spin_lock_irqsave(q->queue_lock, flags);
412 blkdev_dequeue_request(rq);
413 spin_unlock_irqrestore(q->queue_lock, flags);
414
415 hwif->rq = NULL; 408 hwif->rq = NULL;
416
417 return ide_queue_sense_rq(drive, rq) ? 2 : 1; 409 return ide_queue_sense_rq(drive, rq) ? 2 : 1;
418 } else 410 } else
419 return 2; 411 return 2;