diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2006-04-03 06:31:44 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-04 08:42:26 -0400 |
commit | 31ce6daefe2d312e31ee06b0b3301b1cb7878c04 (patch) | |
tree | c956f2e8cecb151b067289504475a57a7e9d7d80 | |
parent | 4332a771f4d2f23a6d3beff3dd5405e79775a211 (diff) |
[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>
-rw-r--r-- | drivers/scsi/libata-core.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index d270b23a03b8..57b3240ee867 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -4097,9 +4097,6 @@ static void ata_pio_task(void *_data) | |||
4097 | fsm_start: | 4097 | fsm_start: |
4098 | WARN_ON(ap->hsm_task_state == HSM_ST_IDLE); | 4098 | WARN_ON(ap->hsm_task_state == HSM_ST_IDLE); |
4099 | 4099 | ||
4100 | qc = ata_qc_from_tag(ap, ap->active_tag); | ||
4101 | WARN_ON(qc == NULL); | ||
4102 | |||
4103 | /* | 4100 | /* |
4104 | * This is purely heuristic. This is a fast path. | 4101 | * This is purely heuristic. This is a fast path. |
4105 | * Sometimes when we enter, BSY will be cleared in | 4102 | * Sometimes when we enter, BSY will be cleared in |
@@ -4112,7 +4109,7 @@ fsm_start: | |||
4112 | msleep(2); | 4109 | msleep(2); |
4113 | status = ata_busy_wait(ap, ATA_BUSY, 10); | 4110 | status = ata_busy_wait(ap, ATA_BUSY, 10); |
4114 | if (status & ATA_BUSY) { | 4111 | if (status & ATA_BUSY) { |
4115 | ata_port_queue_task(ap, ata_pio_task, ap, ATA_SHORT_PAUSE); | 4112 | ata_port_queue_task(ap, ata_pio_task, qc, ATA_SHORT_PAUSE); |
4116 | return; | 4113 | return; |
4117 | } | 4114 | } |
4118 | } | 4115 | } |
@@ -4347,7 +4344,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
4347 | ap->hsm_task_state = HSM_ST_LAST; | 4344 | ap->hsm_task_state = HSM_ST_LAST; |
4348 | 4345 | ||
4349 | if (qc->tf.flags & ATA_TFLAG_POLLING) | 4346 | if (qc->tf.flags & ATA_TFLAG_POLLING) |
4350 | ata_port_queue_task(ap, ata_pio_task, ap, 0); | 4347 | ata_port_queue_task(ap, ata_pio_task, qc, 0); |
4351 | 4348 | ||
4352 | break; | 4349 | break; |
4353 | 4350 | ||
@@ -4369,7 +4366,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
4369 | if (qc->tf.flags & ATA_TFLAG_WRITE) { | 4366 | if (qc->tf.flags & ATA_TFLAG_WRITE) { |
4370 | /* PIO data out protocol */ | 4367 | /* PIO data out protocol */ |
4371 | ap->hsm_task_state = HSM_ST_FIRST; | 4368 | ap->hsm_task_state = HSM_ST_FIRST; |
4372 | ata_port_queue_task(ap, ata_pio_task, ap, 0); | 4369 | ata_port_queue_task(ap, ata_pio_task, qc, 0); |
4373 | 4370 | ||
4374 | /* always send first data block using | 4371 | /* always send first data block using |
4375 | * the ata_pio_task() codepath. | 4372 | * the ata_pio_task() codepath. |
@@ -4379,7 +4376,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
4379 | ap->hsm_task_state = HSM_ST; | 4376 | ap->hsm_task_state = HSM_ST; |
4380 | 4377 | ||
4381 | if (qc->tf.flags & ATA_TFLAG_POLLING) | 4378 | if (qc->tf.flags & ATA_TFLAG_POLLING) |
4382 | ata_port_queue_task(ap, ata_pio_task, ap, 0); | 4379 | ata_port_queue_task(ap, ata_pio_task, qc, 0); |
4383 | 4380 | ||
4384 | /* if polling, ata_pio_task() handles the rest. | 4381 | /* if polling, ata_pio_task() handles the rest. |
4385 | * otherwise, interrupt handler takes over from here. | 4382 | * otherwise, interrupt handler takes over from here. |
@@ -4400,7 +4397,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
4400 | /* send cdb by polling if no cdb interrupt */ | 4397 | /* send cdb by polling if no cdb interrupt */ |
4401 | if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) || | 4398 | if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) || |
4402 | (qc->tf.flags & ATA_TFLAG_POLLING)) | 4399 | (qc->tf.flags & ATA_TFLAG_POLLING)) |
4403 | ata_port_queue_task(ap, ata_pio_task, ap, 0); | 4400 | ata_port_queue_task(ap, ata_pio_task, qc, 0); |
4404 | break; | 4401 | break; |
4405 | 4402 | ||
4406 | case ATA_PROT_ATAPI_DMA: | 4403 | case ATA_PROT_ATAPI_DMA: |
@@ -4412,7 +4409,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
4412 | 4409 | ||
4413 | /* send cdb by polling if no cdb interrupt */ | 4410 | /* send cdb by polling if no cdb interrupt */ |
4414 | if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) | 4411 | if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) |
4415 | ata_port_queue_task(ap, ata_pio_task, ap, 0); | 4412 | ata_port_queue_task(ap, ata_pio_task, qc, 0); |
4416 | break; | 4413 | break; |
4417 | 4414 | ||
4418 | default: | 4415 | default: |