aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_nx.c
diff options
context:
space:
mode:
authorSantosh Vernekar <santosh.vernekar@qlogic.com>2010-05-28 18:08:25 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 13:01:25 -0400
commitcdbb0a4f31c486e4f6fb6e673a892f4f5205f91c (patch)
treeef386912ef74cb07ae79b522db0a31fc7ce14b03 /drivers/scsi/qla2xxx/qla_nx.c
parent3f3b6f98cb33043cba04f45a2f2c43b8303c120c (diff)
[SCSI] qla2xxx: Handle outstanding mbx cmds on hung f/w scenarios.
Outstanding mailbox commands, have no way to recover on f/w hung, and we timeout on waiting for mbx response. This in turn affects the recovery process as follows: - We might already be in dpc while waiting for mbx to complete, so recovery for that pci function will never get invoked. Reset Timeout (10 sec) is far less than mbx timeout (30 sec). - Other mbx cmds will get stuck due to serial mbx access. Solution is to identify fw-hung scenario and handle outstanding mbx commands to have an early-exit instead of waiting for response. Other mbx commands waiting for access will also do an early-exit if fw-hung is still applicable. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_nx.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index 1a9a7343dffa..512ba8a4ac57 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -3543,6 +3543,14 @@ qla82xx_check_fw_alive(scsi_qla_host_t *vha)
3543 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); 3543 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
3544 } 3544 }
3545 qla2xxx_wake_dpc(vha); 3545 qla2xxx_wake_dpc(vha);
3546 if (ha->flags.mbox_busy) {
3547 ha->flags.fw_hung = 1;
3548 ha->flags.mbox_int = 1;
3549 DEBUG2(qla_printk(KERN_ERR, ha,
3550 "Due to fw hung, doing premature "
3551 "completion of mbx command\n"));
3552 complete(&ha->mbx_intr_comp);
3553 }
3546 } 3554 }
3547 } 3555 }
3548 vha->fw_heartbeat_counter = fw_heartbeat_counter; 3556 vha->fw_heartbeat_counter = fw_heartbeat_counter;
@@ -3646,6 +3654,14 @@ void qla82xx_watchdog(scsi_qla_host_t *vha)
3646 "%s(): Adapter reset needed!\n", __func__); 3654 "%s(): Adapter reset needed!\n", __func__);
3647 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); 3655 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
3648 qla2xxx_wake_dpc(vha); 3656 qla2xxx_wake_dpc(vha);
3657 if (ha->flags.mbox_busy) {
3658 ha->flags.fw_hung = 1;
3659 ha->flags.mbox_int = 1;
3660 DEBUG2(qla_printk(KERN_ERR, ha,
3661 "Need reset, doing premature "
3662 "completion of mbx command\n"));
3663 complete(&ha->mbx_intr_comp);
3664 }
3649 } else { 3665 } else {
3650 qla82xx_check_fw_alive(vha); 3666 qla82xx_check_fw_alive(vha);
3651 } 3667 }
@@ -3701,8 +3717,10 @@ qla82xx_abort_isp(scsi_qla_host_t *vha)
3701 qla82xx_clear_rst_ready(ha); 3717 qla82xx_clear_rst_ready(ha);
3702 qla82xx_idc_unlock(ha); 3718 qla82xx_idc_unlock(ha);
3703 3719
3704 if (rval == QLA_SUCCESS) 3720 if (rval == QLA_SUCCESS) {
3721 ha->flags.fw_hung = 0;
3705 qla82xx_restart_isp(vha); 3722 qla82xx_restart_isp(vha);
3723 }
3706 3724
3707 if (rval) { 3725 if (rval) {
3708 vha->flags.online = 1; 3726 vha->flags.online = 1;