diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-atapi.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 1 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 6 |
4 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index a4046e94158..f9daffd7d0e 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c @@ -264,8 +264,8 @@ void ide_retry_pc(ide_drive_t *drive) * of it. The failed command will be retried after sense data * is acquired. */ - blk_requeue_request(failed_rq->q, failed_rq); drive->hwif->rq = NULL; + ide_requeue_and_plug(drive, failed_rq); if (ide_queue_sense_rq(drive, pc)) { blk_start_request(failed_rq); ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq)); diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 2c17e3fb43e..06b14bc9a1d 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -493,6 +493,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) if (rq) { hwif->rq = NULL; rq->errors = 0; + ide_requeue_and_plug(drive, rq); } return ret; } diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index db96138fefc..172ac921815 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -566,7 +566,7 @@ plug_device_2: blk_plug_device(q); } -static void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) +void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) { struct request_queue *q = drive->queue; unsigned long flags; diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index cc8633cbe13..67fb73559fd 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -428,13 +428,11 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, { struct request *rq; int error; + int rw = !(cmd->tf_flags & IDE_TFLAG_WRITE) ? READ : WRITE; - rq = blk_get_request(drive->queue, READ, __GFP_WAIT); + rq = blk_get_request(drive->queue, rw, __GFP_WAIT); rq->cmd_type = REQ_TYPE_ATA_TASKFILE; - if (cmd->tf_flags & IDE_TFLAG_WRITE) - rq->cmd_flags |= REQ_RW; - /* * (ks) We transfer currently only whole sectors. * This is suffient for now. But, it would be great, |