aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2013-12-16 06:49:37 -0500
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 13:19:13 -0400
commit32436aaa226fb13ab2e63372c4453377c2a658fc (patch)
treecea264ea6818a8a7ea2bf8d3efcfece79a4528b9
parent7f15ebceb174d5588e715c7de714e78595fcefc8 (diff)
[SCSI] qla4xxx: Correctly handle msleep_interruptible
If waiting for signals was interrupted then the device was put to FAILED state. Use msleep instead of msleep_interruptible to handle this correctly. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 0ec07ecd5fa2..cbc68f915cc6 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -2820,7 +2820,7 @@ void qla4_8xxx_get_minidump(struct scsi_qla_host *ha)
2820int qla4_8xxx_device_bootstrap(struct scsi_qla_host *ha) 2820int qla4_8xxx_device_bootstrap(struct scsi_qla_host *ha)
2821{ 2821{
2822 int rval = QLA_ERROR; 2822 int rval = QLA_ERROR;
2823 int i, timeout; 2823 int i;
2824 uint32_t old_count, count; 2824 uint32_t old_count, count;
2825 int need_reset = 0, peg_stuck = 1; 2825 int need_reset = 0, peg_stuck = 1;
2826 2826
@@ -2828,13 +2828,7 @@ int qla4_8xxx_device_bootstrap(struct scsi_qla_host *ha)
2828 old_count = qla4_8xxx_rd_direct(ha, QLA8XXX_PEG_ALIVE_COUNTER); 2828 old_count = qla4_8xxx_rd_direct(ha, QLA8XXX_PEG_ALIVE_COUNTER);
2829 2829
2830 for (i = 0; i < 10; i++) { 2830 for (i = 0; i < 10; i++) {
2831 timeout = msleep_interruptible(200); 2831 msleep(200);
2832 if (timeout) {
2833 qla4_8xxx_wr_direct(ha, QLA8XXX_CRB_DEV_STATE,
2834 QLA8XXX_DEV_FAILED);
2835 return rval;
2836 }
2837
2838 count = qla4_8xxx_rd_direct(ha, QLA8XXX_PEG_ALIVE_COUNTER); 2832 count = qla4_8xxx_rd_direct(ha, QLA8XXX_PEG_ALIVE_COUNTER);
2839 if (count != old_count) 2833 if (count != old_count)
2840 peg_stuck = 0; 2834 peg_stuck = 0;