summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaurav Kashyap <saurav.kashyap@qlogic.com>2011-08-16 11:31:46 -0700
committerJames Bottomley <JBottomley@Parallels.com>2011-08-29 00:14:55 -0700
commitc8582ad95bcbdf46f799d310d7dfee73d941c2f4 (patch)
tree82004ba6ad4b678a74f66ffacd8b40676a13f7a4
parent999916dc59dc2fb0de221ad607d58cdc88fcbbe4 (diff)
downloadtalos-obmc-linux-c8582ad95bcbdf46f799d310d7dfee73d941c2f4.tar.gz
talos-obmc-linux-c8582ad95bcbdf46f799d310d7dfee73d941c2f4.zip
[SCSI] qla2xxx: Prevent CPU lockups when "ql2xdontresethba" module param is set.
Driver is not releasing the lock if ql2xdontresethba is set, this might lead to a lockup. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index b03c86b7a989..fe9db224794d 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -3761,10 +3761,15 @@ qla82xx_device_state_handler(scsi_qla_host_t *vha)
qla82xx_idc_lock(ha);
break;
case QLA82XX_DEV_NEED_RESET:
- if (!ql2xdontresethba)
- qla82xx_need_reset_handler(vha);
+ if (!ql2xdontresethba)
+ qla82xx_need_reset_handler(vha);
+ else {
+ qla82xx_idc_unlock(ha);
+ msleep(1000);
+ qla82xx_idc_lock(ha);
+ }
dev_init_timeout = jiffies +
- (ha->nx_dev_init_timeout * HZ);
+ (ha->nx_dev_init_timeout * HZ);
break;
case QLA82XX_DEV_NEED_QUIESCENT:
qla82xx_need_qsnt_handler(vha);
OpenPOWER on IntegriCloud