diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2005-12-05 15:36:08 +0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-06 04:49:22 -0500 |
commit | c14b8331ec4843e4f2b67a4d847a0d812a50e43c (patch) | |
tree | 453d07d81ded3b4845aab08f4825a7dda35340f5 /drivers/scsi/libata-core.c | |
parent | f38f2a2c6f32bb29bacb95acd8f8a0d6b7270fa9 (diff) | |
download | lwn-c14b8331ec4843e4f2b67a4d847a0d812a50e43c.tar.gz lwn-c14b8331ec4843e4f2b67a4d847a0d812a50e43c.zip |
[PATCH] libata: minor patch before moving err_mask
- add qc to ata_pio_poll()
- reorder the initialization of qc in ata_pio_complete()
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
===================
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 11ed6fa27096..0a959566f964 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -2802,10 +2802,14 @@ void ata_poll_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask) static unsigned long ata_pio_poll(struct ata_port *ap) { + struct ata_queued_cmd *qc; u8 status; unsigned int poll_state = HSM_ST_UNKNOWN; unsigned int reg_state = HSM_ST_UNKNOWN; + qc = ata_qc_from_tag(ap, ap->active_tag); + assert(qc != NULL); + switch (ap->hsm_task_state) { case HSM_ST: case HSM_ST_POLL: @@ -2870,15 +2874,15 @@ static int ata_pio_complete (struct ata_port *ap) } } + qc = ata_qc_from_tag(ap, ap->active_tag); + assert(qc != NULL); + drv_stat = ata_wait_idle(ap); if (!ata_ok(drv_stat)) { ap->hsm_task_state = HSM_ST_ERR; return 0; } - qc = ata_qc_from_tag(ap, ap->active_tag); - assert(qc != NULL); - ap->hsm_task_state = HSM_ST_IDLE; ata_poll_qc_complete(qc, 0); |