From 8995f1c24157a7847e852509e1fcf97545de66b6 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 25 Aug 2014 11:46:43 +0000 Subject: [PATCH] ib_srpt: Speed up kernel driver unloading after a cable pull When unloading the ib_srpt kernel module, instead of waiting until all connected queue pairs have left the TimeWait state, destroy these queue pairs immediately. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5727 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 4c920b441..ae6410018 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2286,12 +2286,12 @@ static void __srpt_close_all_ch(struct srpt_tgt *srpt_tgt) list_for_each_entry(nexus, &srpt_tgt->nexus_list, entry) { list_for_each_entry(ch, &nexus->ch_list, list) { - if (srpt_disconnect_ch(ch) < 0) - continue; - PRINT_INFO("Closing channel %s-%d because target %s has" - " been disabled", ch->sess_name, - ch->qp->qp_num, - srpt_tgt->scst_tgt->tgt_name); + if (srpt_disconnect_ch(ch) >= 0) + PRINT_INFO("Closing channel %s-%d because" + " target %s has been disabled", + ch->sess_name, ch->qp->qp_num, + srpt_tgt->scst_tgt->tgt_name); + srpt_close_ch(ch); } } }