aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-07-15 15:21:44 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:44 -0400
commit5f2e1ceef45ac07d7c52d16de2531a56c453bb0f (patch)
treec31ab3c7677231a121fd2a31a82b960db02a9384 /drivers/ide/ide-io.c
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/ide/ide-io.c')
-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 1eb3f5cce556..29f5cc863f6e 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
1584{ 1584{
1585 unsigned long flags; 1585 unsigned long flags;
1586 ide_hwgroup_t *hwgroup = HWGROUP(drive); 1586 ide_hwgroup_t *hwgroup = HWGROUP(drive);
1587 DECLARE_COMPLETION_ONSTACK(wait); 1587 int where = ELEVATOR_INSERT_BACK;
1588 int where = ELEVATOR_INSERT_BACK, err;
1589 int must_wait = (action == ide_wait || action == ide_head_wait);
1590 1588
1591 rq->errors = 0; 1589 rq->errors = 0;
1592 1590
1593 /* 1591 if (action == ide_preempt)
1594 * we need to hold an extra reference to request for safe inspection
1595 * after completion
1596 */
1597 if (must_wait) {
1598 rq->ref_count++;
1599 rq->end_io_data = &wait;
1600 rq->end_io = blk_end_sync_rq;
1601 }
1602
1603 if (action == ide_preempt || action == ide_head_wait)
1604 where = ELEVATOR_INSERT_FRONT; 1592 where = ELEVATOR_INSERT_FRONT;
1605 1593
1606 spin_lock_irqsave(&ide_lock, flags); 1594 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
1613 do_ide_request(drive->queue); 1601 do_ide_request(drive->queue);
1614 spin_unlock_irqrestore(&ide_lock, flags); 1602 spin_unlock_irqrestore(&ide_lock, flags);
1615 1603
1616 err = 0; 1604 return 0;
1617 if (must_wait) {
1618 wait_for_completion(&wait);
1619 if (rq->errors)
1620 err = -EIO;
1621
1622 blk_put_request(rq);
1623 }
1624
1625 return err;
1626} 1605}
1627 1606
1628EXPORT_SYMBOL(ide_do_drive_cmd); 1607EXPORT_SYMBOL(ide_do_drive_cmd);