Commit b85e0957 authored by Joe Carnuccio's avatar Joe Carnuccio Committed by Martin K. Petersen

scsi: qla2xxx: Add timeout ability to wait_for_sess_deletion().

Signed-off-by: default avatarJoe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent fed0f68a
...@@ -1141,7 +1141,7 @@ qla2x00_wait_for_sess_deletion(scsi_qla_host_t *vha) ...@@ -1141,7 +1141,7 @@ qla2x00_wait_for_sess_deletion(scsi_qla_host_t *vha)
{ {
qla2x00_mark_all_devices_lost(vha, 0); 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);
} }
/* /*
......
...@@ -1479,7 +1479,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt) ...@@ -1479,7 +1479,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt)
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00a, ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00a,
"Waiting for tgt %p: sess_count=%d\n", tgt, tgt->sess_count); "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 */ /* Big hammer */
if (!ha->flags.host_shutting_down && if (!ha->flags.host_shutting_down &&
...@@ -1487,7 +1487,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt) ...@@ -1487,7 +1487,7 @@ int qlt_stop_phase1(struct qla_tgt *tgt)
qlt_disable_vha(vha); qlt_disable_vha(vha);
/* Wait for sessions to clear out (just in case) */ /* 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; return 0;
} }
EXPORT_SYMBOL(qlt_stop_phase1); EXPORT_SYMBOL(qlt_stop_phase1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment