diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-07-15 15:21:43 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:43 -0400 |
commit | dd47087bc173a84e8c42644b315d38b30dc02263 (patch) | |
tree | ff9c8637edae1f998a2d9446c246b007ab301849 /drivers/ide/ide-disk.c | |
parent | 0ef4c4db7faabe4fb8a516e9e991e1e8e87a647f (diff) |
ide-disk: convert ide_do_drive_cmd path to use blk_execute_rq
This converts the ide_do_drive_cmd path using ide_wait to use
blk_execute_rq.
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-disk.c')
-rw-r--r-- | drivers/ide/ide-disk.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 8e08d083fce9..c5f22ef8ed24 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -617,7 +617,8 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) | |||
617 | */ | 617 | */ |
618 | static int set_multcount(ide_drive_t *drive, int arg) | 618 | static int set_multcount(ide_drive_t *drive, int arg) |
619 | { | 619 | { |
620 | struct request rq; | 620 | struct request *rq; |
621 | int error; | ||
621 | 622 | ||
622 | if (arg < 0 || arg > drive->id->max_multsect) | 623 | if (arg < 0 || arg > drive->id->max_multsect) |
623 | return -EINVAL; | 624 | return -EINVAL; |
@@ -625,12 +626,13 @@ static int set_multcount(ide_drive_t *drive, int arg) | |||
625 | if (drive->special.b.set_multmode) | 626 | if (drive->special.b.set_multmode) |
626 | return -EBUSY; | 627 | return -EBUSY; |
627 | 628 | ||
628 | ide_init_drive_cmd(&rq); | 629 | rq = blk_get_request(drive->queue, READ, __GFP_WAIT); |
629 | rq.cmd_type = REQ_TYPE_ATA_TASKFILE; | 630 | rq->cmd_type = REQ_TYPE_ATA_TASKFILE; |
630 | 631 | ||
631 | drive->mult_req = arg; | 632 | drive->mult_req = arg; |
632 | drive->special.b.set_multmode = 1; | 633 | drive->special.b.set_multmode = 1; |
633 | (void)ide_do_drive_cmd(drive, &rq, ide_wait); | 634 | error = blk_execute_rq(drive->queue, NULL, rq, 0); |
635 | blk_put_request(rq); | ||
634 | 636 | ||
635 | return (drive->mult_count == arg) ? 0 : -EIO; | 637 | return (drive->mult_count == arg) ? 0 : -EIO; |
636 | } | 638 | } |