aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c10
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 */
618static int set_multcount(ide_drive_t *drive, int arg) 618static 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}