Skip to content

Commit

Permalink
[SCSI] qla2xxx: Correctly set fw hung and complete only waiting mbx.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Giridhar Malavali authored and James Bottomley committed Sep 5, 2010
1 parent efa786c commit 4142b19
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions drivers/scsi/qla2xxx/qla_nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3307,13 +3307,15 @@ qla82xx_check_fw_alive(scsi_qla_host_t *vha)
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
}
qla2xxx_wake_dpc(vha);
ha->flags.fw_hung = 1;
if (ha->flags.mbox_busy) {
ha->flags.fw_hung = 1;
ha->flags.mbox_int = 1;
DEBUG2(qla_printk(KERN_ERR, ha,
"Due to fw hung, doing premature "
"completion of mbx command\n"));
complete(&ha->mbx_intr_comp);
"Due to fw hung, doing premature "
"completion of mbx command\n"));
if (test_bit(MBX_INTR_WAIT,
&ha->mbx_cmd_flags))
complete(&ha->mbx_intr_comp);
}
}
} else
Expand Down Expand Up @@ -3419,13 +3421,15 @@ void qla82xx_watchdog(scsi_qla_host_t *vha)
"%s(): Adapter reset needed!\n", __func__);
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
qla2xxx_wake_dpc(vha);
ha->flags.fw_hung = 1;
if (ha->flags.mbox_busy) {
ha->flags.fw_hung = 1;
ha->flags.mbox_int = 1;
DEBUG2(qla_printk(KERN_ERR, ha,
"Need reset, doing premature "
"completion of mbx command\n"));
complete(&ha->mbx_intr_comp);
"Need reset, doing premature "
"completion of mbx command\n"));
if (test_bit(MBX_INTR_WAIT,
&ha->mbx_cmd_flags))
complete(&ha->mbx_intr_comp);
}
} else {
qla82xx_check_fw_alive(vha);
Expand Down

0 comments on commit 4142b19

Please sign in to comment.