aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-07-15 21:21:44 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 21:21:44 +0200
commit5f2e1ceef45ac07d7c52d16de2531a56c453bb0f (patch)
treec31ab3c7677231a121fd2a31a82b960db02a9384 /drivers
parent5b114715ed63f3a4fdf790f5df61364fc4adadf1 (diff)
ide: remove ide_wait/head_wait path in ide_do_drive_cmd
Now all the users of ide_do_drive_cmd using ide_wait/head_wait are converted to use blk_execute_rq this removes the ide_wait/head_wait path in ide_do_drive_cmd. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-io.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 1eb3f5cce55..29f5cc863f6 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1584,23 +1584,11 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio
{
unsigned long flags;
ide_hwgroup_t *hwgroup = HWGROUP(drive);
- DECLARE_COMPLETION_ONSTACK(wait);
- int where = ELEVATOR_INSERT_BACK, err;
- int must_wait = (action == ide_wait || action == ide_head_wait);
+ int where = ELEVATOR_INSERT_BACK;
rq->errors = 0;
- /*
- * we need to hold an extra reference to request for safe inspection
- * after completion
- */
- if (must_wait) {
- rq->ref_count++;
- rq->end_io_data = &wait;
- rq->end_io = blk_end_sync_rq;
- }
-
- if (action == ide_preempt || action == ide_head_wait)
+ if (action == ide_preempt)
where = ELEVATOR_INSERT_FRONT;
spin_lock_irqsave(&ide_lock, flags);
@@ -1613,16 +1601,7 @@ int ide_do_drive_cmd (ide_drive_t *drive, struct request *rq, ide_action_t actio
do_ide_request(drive->queue);
spin_unlock_irqrestore(&ide_lock, flags);
- err = 0;
- if (must_wait) {
- wait_for_completion(&wait);
- if (rq->errors)
- err = -EIO;
-
- blk_put_request(rq);
- }
-
- return err;
+ return 0;
}
EXPORT_SYMBOL(ide_do_drive_cmd);