aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-12-05 02:36:08 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-06 04:49:22 -0500
commitc14b8331ec4843e4f2b67a4d847a0d812a50e43c (patch)
tree453d07d81ded3b4845aab08f4825a7dda35340f5 /drivers
parentf38f2a2c6f32bb29bacb95acd8f8a0d6b7270fa9 (diff)
[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')
-rw-r--r--drivers/scsi/libata-core.c10
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)
2802 2802
2803static unsigned long ata_pio_poll(struct ata_port *ap) 2803static unsigned long ata_pio_poll(struct ata_port *ap)
2804{ 2804{
2805 struct ata_queued_cmd *qc;
2805 u8 status; 2806 u8 status;
2806 unsigned int poll_state = HSM_ST_UNKNOWN; 2807 unsigned int poll_state = HSM_ST_UNKNOWN;
2807 unsigned int reg_state = HSM_ST_UNKNOWN; 2808 unsigned int reg_state = HSM_ST_UNKNOWN;
2808 2809
2810 qc = ata_qc_from_tag(ap, ap->active_tag);
2811 assert(qc != NULL);
2812
2809 switch (ap->hsm_task_state) { 2813 switch (ap->hsm_task_state) {
2810 case HSM_ST: 2814 case HSM_ST:
2811 case HSM_ST_POLL: 2815 case HSM_ST_POLL:
@@ -2870,15 +2874,15 @@ static int ata_pio_complete (struct ata_port *ap)
2870 } 2874 }
2871 } 2875 }
2872 2876
2877 qc = ata_qc_from_tag(ap, ap->active_tag);
2878 assert(qc != NULL);
2879
2873 drv_stat = ata_wait_idle(ap); 2880 drv_stat = ata_wait_idle(ap);
2874 if (!ata_ok(drv_stat)) { 2881 if (!ata_ok(drv_stat)) {
2875 ap->hsm_task_state = HSM_ST_ERR; 2882 ap->hsm_task_state = HSM_ST_ERR;
2876 return 0; 2883 return 0;
2877 } 2884 }
2878 2885
2879 qc = ata_qc_from_tag(ap, ap->active_tag);
2880 assert(qc != NULL);
2881
2882 ap->hsm_task_state = HSM_ST_IDLE; 2886 ap->hsm_task_state = HSM_ST_IDLE;
2883 2887
2884 ata_poll_qc_complete(qc, 0); 2888 ata_poll_qc_complete(qc, 0);