mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
[PATCH] libata-dev: irq-pio minor fix 2
irq-pio minor fix 2: - Use qc as data for ata_pio_task(). Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
4332a771f4
commit
31ce6daefe
1 changed files with 6 additions and 9 deletions
|
@ -4097,9 +4097,6 @@ static void ata_pio_task(void *_data)
|
||||||
fsm_start:
|
fsm_start:
|
||||||
WARN_ON(ap->hsm_task_state == HSM_ST_IDLE);
|
WARN_ON(ap->hsm_task_state == HSM_ST_IDLE);
|
||||||
|
|
||||||
qc = ata_qc_from_tag(ap, ap->active_tag);
|
|
||||||
WARN_ON(qc == NULL);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is purely heuristic. This is a fast path.
|
* This is purely heuristic. This is a fast path.
|
||||||
* Sometimes when we enter, BSY will be cleared in
|
* Sometimes when we enter, BSY will be cleared in
|
||||||
|
@ -4112,7 +4109,7 @@ static void ata_pio_task(void *_data)
|
||||||
msleep(2);
|
msleep(2);
|
||||||
status = ata_busy_wait(ap, ATA_BUSY, 10);
|
status = ata_busy_wait(ap, ATA_BUSY, 10);
|
||||||
if (status & ATA_BUSY) {
|
if (status & ATA_BUSY) {
|
||||||
ata_port_queue_task(ap, ata_pio_task, ap, ATA_SHORT_PAUSE);
|
ata_port_queue_task(ap, ata_pio_task, qc, ATA_SHORT_PAUSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4347,7 +4344,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
ap->hsm_task_state = HSM_ST_LAST;
|
ap->hsm_task_state = HSM_ST_LAST;
|
||||||
|
|
||||||
if (qc->tf.flags & ATA_TFLAG_POLLING)
|
if (qc->tf.flags & ATA_TFLAG_POLLING)
|
||||||
ata_port_queue_task(ap, ata_pio_task, ap, 0);
|
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -4369,7 +4366,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
if (qc->tf.flags & ATA_TFLAG_WRITE) {
|
if (qc->tf.flags & ATA_TFLAG_WRITE) {
|
||||||
/* PIO data out protocol */
|
/* PIO data out protocol */
|
||||||
ap->hsm_task_state = HSM_ST_FIRST;
|
ap->hsm_task_state = HSM_ST_FIRST;
|
||||||
ata_port_queue_task(ap, ata_pio_task, ap, 0);
|
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
||||||
|
|
||||||
/* always send first data block using
|
/* always send first data block using
|
||||||
* the ata_pio_task() codepath.
|
* the ata_pio_task() codepath.
|
||||||
|
@ -4379,7 +4376,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
ap->hsm_task_state = HSM_ST;
|
ap->hsm_task_state = HSM_ST;
|
||||||
|
|
||||||
if (qc->tf.flags & ATA_TFLAG_POLLING)
|
if (qc->tf.flags & ATA_TFLAG_POLLING)
|
||||||
ata_port_queue_task(ap, ata_pio_task, ap, 0);
|
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
||||||
|
|
||||||
/* if polling, ata_pio_task() handles the rest.
|
/* if polling, ata_pio_task() handles the rest.
|
||||||
* otherwise, interrupt handler takes over from here.
|
* otherwise, interrupt handler takes over from here.
|
||||||
|
@ -4400,7 +4397,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
/* send cdb by polling if no cdb interrupt */
|
/* send cdb by polling if no cdb interrupt */
|
||||||
if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) ||
|
if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) ||
|
||||||
(qc->tf.flags & ATA_TFLAG_POLLING))
|
(qc->tf.flags & ATA_TFLAG_POLLING))
|
||||||
ata_port_queue_task(ap, ata_pio_task, ap, 0);
|
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATA_PROT_ATAPI_DMA:
|
case ATA_PROT_ATAPI_DMA:
|
||||||
|
@ -4412,7 +4409,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
|
|
||||||
/* send cdb by polling if no cdb interrupt */
|
/* send cdb by polling if no cdb interrupt */
|
||||||
if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
|
if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
|
||||||
ata_port_queue_task(ap, ata_pio_task, ap, 0);
|
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue