From 407f5b0c64a5ad2a20e719bf380a201b68f9b7dc Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 18 Sep 2011 08:01:29 +0000 Subject: [PATCH] Follow-up for r3866 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3867 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index da62f327a..bdbb341ee 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2006,17 +2006,18 @@ static int srpt_compl_thread(void *arg) ret = wait_event_timeout(ch->state_wq, ch->state >= CH_DRAINING, RDMA_COMPL_TIMEOUT_S * HZ); WARN_ON(ret < 0); + if (!ret) { + PRINT_ERROR("%s: DREP message has not been received in time.", + ch->sess_name); + srpt_drain_channel(ch->cm_id); + } ret = wait_event_timeout(ch->state_wq, ch->state == CH_RELEASING, RDMA_COMPL_TIMEOUT_S * HZ); WARN_ON(ret < 0); if (!ret) { - PRINT_ERROR("%s: %s has not been received in time.", - ch->sess_name, - ch->state == CH_DISCONNECTING ? "DREP message" : - ch->state == CH_DRAINING ? "Last WQE event" : - "(?)"); - srpt_drain_channel(ch->cm_id); + PRINT_ERROR("%s: Last WQE event has not been received in time.", + ch->sess_name); srpt_test_and_set_ch_state(ch, CH_DRAINING, CH_RELEASING); }