aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorGiridhar Malavali <giridhar.malavali@qlogic.com>2010-09-03 17:57:03 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-09-05 14:18:29 -0400
commit4142b1987f1f8ba90589642cb74566eaff3dc2e9 (patch)
treed2a7dae8535899671fccae3d9c70e1a6e7c13d75 /drivers/scsi
parentefa786cc43a114d0bf2e4b95e856ea6911404d58 (diff)
[SCSI] qla2xxx: Correctly set fw hung and complete only waiting mbx.
The fw_hung flag should be set ir-respective of if there is a mbx command pending or not. Also the complete should be called if there is a mbx waiting. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index e54d2fa1c9f1..ad290dc9ba35 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -3307,13 +3307,15 @@ qla82xx_check_fw_alive(scsi_qla_host_t *vha)
3307 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); 3307 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
3308 } 3308 }
3309 qla2xxx_wake_dpc(vha); 3309 qla2xxx_wake_dpc(vha);
3310 ha->flags.fw_hung = 1;
3310 if (ha->flags.mbox_busy) { 3311 if (ha->flags.mbox_busy) {
3311 ha->flags.fw_hung = 1;
3312 ha->flags.mbox_int = 1; 3312 ha->flags.mbox_int = 1;
3313 DEBUG2(qla_printk(KERN_ERR, ha, 3313 DEBUG2(qla_printk(KERN_ERR, ha,
3314 "Due to fw hung, doing premature " 3314 "Due to fw hung, doing premature "
3315 "completion of mbx command\n")); 3315 "completion of mbx command\n"));
3316 complete(&ha->mbx_intr_comp); 3316 if (test_bit(MBX_INTR_WAIT,
3317 &ha->mbx_cmd_flags))
3318 complete(&ha->mbx_intr_comp);
3317 } 3319 }
3318 } 3320 }
3319 } else 3321 } else
@@ -3419,13 +3421,15 @@ void qla82xx_watchdog(scsi_qla_host_t *vha)
3419 "%s(): Adapter reset needed!\n", __func__); 3421 "%s(): Adapter reset needed!\n", __func__);
3420 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); 3422 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
3421 qla2xxx_wake_dpc(vha); 3423 qla2xxx_wake_dpc(vha);
3424 ha->flags.fw_hung = 1;
3422 if (ha->flags.mbox_busy) { 3425 if (ha->flags.mbox_busy) {
3423 ha->flags.fw_hung = 1;
3424 ha->flags.mbox_int = 1; 3426 ha->flags.mbox_int = 1;
3425 DEBUG2(qla_printk(KERN_ERR, ha, 3427 DEBUG2(qla_printk(KERN_ERR, ha,
3426 "Need reset, doing premature " 3428 "Need reset, doing premature "
3427 "completion of mbx command\n")); 3429 "completion of mbx command\n"));
3428 complete(&ha->mbx_intr_comp); 3430 if (test_bit(MBX_INTR_WAIT,
3431 &ha->mbx_cmd_flags))
3432 complete(&ha->mbx_intr_comp);
3429 } 3433 }
3430 } else { 3434 } else {
3431 qla82xx_check_fw_alive(vha); 3435 qla82xx_check_fw_alive(vha);