Commit cf90bfe2 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide: Fix IDE taskfile with cfq scheduler
  ide: Must hold queue lock when requeueing
  ide: Requeue request after DMA timeout
parents 0a2851b9 720fc22a
...@@ -264,8 +264,8 @@ void ide_retry_pc(ide_drive_t *drive) ...@@ -264,8 +264,8 @@ void ide_retry_pc(ide_drive_t *drive)
* of it. The failed command will be retried after sense data * of it. The failed command will be retried after sense data
* is acquired. * is acquired.
*/ */
blk_requeue_request(failed_rq->q, failed_rq);
drive->hwif->rq = NULL; drive->hwif->rq = NULL;
ide_requeue_and_plug(drive, failed_rq);
if (ide_queue_sense_rq(drive, pc)) { if (ide_queue_sense_rq(drive, pc)) {
blk_start_request(failed_rq); blk_start_request(failed_rq);
ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq)); ide_complete_rq(drive, -EIO, blk_rq_bytes(failed_rq));
......
...@@ -493,6 +493,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error) ...@@ -493,6 +493,7 @@ ide_startstop_t ide_dma_timeout_retry(ide_drive_t *drive, int error)
if (rq) { if (rq) {
hwif->rq = NULL; hwif->rq = NULL;
rq->errors = 0; rq->errors = 0;
ide_requeue_and_plug(drive, rq);
} }
return ret; return ret;
} }
......
...@@ -566,7 +566,7 @@ void do_ide_request(struct request_queue *q) ...@@ -566,7 +566,7 @@ void do_ide_request(struct request_queue *q)
blk_plug_device(q); 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; struct request_queue *q = drive->queue;
unsigned long flags; unsigned long flags;
......
...@@ -428,13 +428,11 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf, ...@@ -428,13 +428,11 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf,
{ {
struct request *rq; struct request *rq;
int error; 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; 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. * (ks) We transfer currently only whole sectors.
* This is suffient for now. But, it would be great, * This is suffient for now. But, it would be great,
......
...@@ -1169,6 +1169,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); ...@@ -1169,6 +1169,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout);
extern void ide_timer_expiry(unsigned long); extern void ide_timer_expiry(unsigned long);
extern irqreturn_t ide_intr(int irq, void *dev_id); extern irqreturn_t ide_intr(int irq, void *dev_id);
extern void do_ide_request(struct request_queue *); extern void do_ide_request(struct request_queue *);
extern void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq);
void ide_init_disk(struct gendisk *, ide_drive_t *); void ide_init_disk(struct gendisk *, ide_drive_t *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment