aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorSantosh Vernekar <santosh.vernekar@qlogic.com>2010-05-28 15:08:25 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-07-27 12:01:25 -0500
commitcdbb0a4f31c486e4f6fb6e673a892f4f5205f91c (patch)
treeef386912ef74cb07ae79b522db0a31fc7ce14b03 /drivers/scsi/qla2xxx/qla_init.c
parent3f3b6f98cb33043cba04f45a2f2c43b8303c120c (diff)
downloadkernel_samsung_smdk4412-cdbb0a4f31c486e4f6fb6e673a892f4f5205f91c.zip
kernel_samsung_smdk4412-cdbb0a4f31c486e4f6fb6e673a892f4f5205f91c.tar.gz
kernel_samsung_smdk4412-cdbb0a4f31c486e4f6fb6e673a892f4f5205f91c.tar.bz2
[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_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 9d969b5..4c6cacc 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1972,7 +1972,8 @@ qla2x00_fw_ready(scsi_qla_host_t *vha)
}
} else {
/* Mailbox cmd failed. Timeout on min_wait. */
- if (time_after_eq(jiffies, mtime))
+ if (time_after_eq(jiffies, mtime) ||
+ (IS_QLA82XX(ha) && ha->flags.fw_hung))
break;
}