[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>
This commit is contained in:
parent
efa786cc43
commit
4142b1987f
1 changed files with 12 additions and 8 deletions
|
@ -3307,12 +3307,14 @@ qla82xx_check_fw_alive(scsi_qla_host_t *vha)
|
||||||
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
|
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
|
||||||
}
|
}
|
||||||
qla2xxx_wake_dpc(vha);
|
qla2xxx_wake_dpc(vha);
|
||||||
if (ha->flags.mbox_busy) {
|
|
||||||
ha->flags.fw_hung = 1;
|
ha->flags.fw_hung = 1;
|
||||||
|
if (ha->flags.mbox_busy) {
|
||||||
ha->flags.mbox_int = 1;
|
ha->flags.mbox_int = 1;
|
||||||
DEBUG2(qla_printk(KERN_ERR, ha,
|
DEBUG2(qla_printk(KERN_ERR, ha,
|
||||||
"Due to fw hung, doing premature "
|
"Due to fw hung, doing premature "
|
||||||
"completion of mbx command\n"));
|
"completion of mbx command\n"));
|
||||||
|
if (test_bit(MBX_INTR_WAIT,
|
||||||
|
&ha->mbx_cmd_flags))
|
||||||
complete(&ha->mbx_intr_comp);
|
complete(&ha->mbx_intr_comp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3419,12 +3421,14 @@ void qla82xx_watchdog(scsi_qla_host_t *vha)
|
||||||
"%s(): Adapter reset needed!\n", __func__);
|
"%s(): Adapter reset needed!\n", __func__);
|
||||||
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
|
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
|
||||||
qla2xxx_wake_dpc(vha);
|
qla2xxx_wake_dpc(vha);
|
||||||
if (ha->flags.mbox_busy) {
|
|
||||||
ha->flags.fw_hung = 1;
|
ha->flags.fw_hung = 1;
|
||||||
|
if (ha->flags.mbox_busy) {
|
||||||
ha->flags.mbox_int = 1;
|
ha->flags.mbox_int = 1;
|
||||||
DEBUG2(qla_printk(KERN_ERR, ha,
|
DEBUG2(qla_printk(KERN_ERR, ha,
|
||||||
"Need reset, doing premature "
|
"Need reset, doing premature "
|
||||||
"completion of mbx command\n"));
|
"completion of mbx command\n"));
|
||||||
|
if (test_bit(MBX_INTR_WAIT,
|
||||||
|
&ha->mbx_cmd_flags))
|
||||||
complete(&ha->mbx_intr_comp);
|
complete(&ha->mbx_intr_comp);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue