summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorJoe Carnuccio <joe.carnuccio@cavium.com>2017-08-23 15:05:11 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-24 22:29:26 -0400
commitb85e0957b8a81003511e4b950ec6e6d2e7fc830d (patch)
tree4b46c3a38a96ae0a80a1ef303f25793ce1d589a3 /drivers/scsi/qla2xxx
parentfed0f68aa167e5574b2266595467f5164ecaa8ec (diff)
scsi: qla2xxx: Add timeout ability to wait_for_sess_deletion().
Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 10c3ee53ec3a..c217cec4dd49 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1141,7 +1141,7 @@ qla2x00_wait_for_sess_deletion(scsi_qla_host_t *vha)
{
qla2x00_mark_all_devices_lost(vha, 0);
- wait_event(vha->fcport_waitQ, test_fcport_count(vha));
+ wait_event_timeout(vha->fcport_waitQ, test_fcport_count(vha), 10*HZ);
}
/*
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 3bcfbee2ae26..6a6d9db6479f 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -1479,7 +1479,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt)
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00a,
"Waiting for tgt %p: sess_count=%d\n", tgt, tgt->sess_count);
- wait_event(tgt->waitQ, test_tgt_sess_count(tgt));
+ wait_event_timeout(tgt->waitQ, test_tgt_sess_count(tgt), 10*HZ);
/* Big hammer */
if (!ha->flags.host_shutting_down &&
@@ -1487,7 +1487,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt)
qlt_disable_vha(vha);
/* Wait for sessions to clear out (just in case) */
- wait_event(tgt->waitQ, test_tgt_sess_count(tgt));
+ wait_event_timeout(tgt->waitQ, test_tgt_sess_count(tgt), 10*HZ);
return 0;
}
EXPORT_SYMBOL(qlt_stop_phase1);