Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Greg Kroah-Hartman Newsgroups: linux.kernel Subject: [PATCH 4.0 48/58] IB/srp: Fix reconnection failure handling Date: Sun, 19 Jul 2015 21:30:03 +0200 Message-ID: References: X-Original-To: linux-kernel@vger.kernel.org X-Mailer: git-send-email 2.4.6 User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 46 Organization: linux.* mail to news gateway X-Original-Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bart Van Assche , Sagi Grimberg , Sebastian Parschauer , Doug Ledford X-Original-Date: Sun, 19 Jul 2015 12:11:26 -0700 X-Original-Message-ID: <20150719190812.846319109@linuxfoundation.org> X-Original-References: <20150719190811.308546345@linuxfoundation.org> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: aioe.org linux.kernel:1187806 4.0-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bart Van Assche commit a44074f14ba1ea0747ea737026eb929b81993dc3 upstream. Although it is possible to let SRP I/O continue if a reconnect results in a reduction of the number of channels, the current code does not handle this scenario correctly. Instead of making the reconnect code more complex, consider this as a reconnection failure. Signed-off-by: Bart Van Assche Cc: Sagi Grimberg Cc: Sebastian Parschauer Signed-off-by: Doug Ledford Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/ulp/srp/ib_srp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -1242,11 +1242,8 @@ static int srp_rport_reconnect(struct sr for (i = 0; i < target->ch_count; i++) { ch = &target->ch[i]; - if (ret || !ch->target) { - if (i > 1) - ret = 0; + if (ret || !ch->target) break; - } ret = srp_connect_ch(ch, multich); multich = true; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/