summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2018-11-10 05:27:39 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-13 08:51:32 +0100
commitcd69bcc07ac1be675ba976917163318858668d1f (patch)
tree827e6c131b132d881e7d3c4f734de8811c5ce039
parentc3a62b651d74fc541989e5c7b20bd3a24c396a50 (diff)
downloadlinux-stable-cd69bcc07ac1be675ba976917163318858668d1f.tar.gz
linux-stable-cd69bcc07ac1be675ba976917163318858668d1f.tar.bz2
linux-stable-cd69bcc07ac1be675ba976917163318858668d1f.zip
iw_cxgb4: only reconnect with MPAv1 if the peer aborts
[ Upstream commit 9828ca654b52848e7eb7dcc9b0994ff130dd4546 ] Only retry connection setup with MPAv1 if the peer actually aborted the connection upon receiving the MPAv2 start message. This avoids retrying with MPAv1 in the case where the connection was aborted due to retransmit timeouts. Fixes: d2fe99e86bb2 ("RDMA/cxgb4: Add support for MPAv2 Enhanced RDMA Negotiation") Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index a5ff1f0f2073..4dcc92d11609 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2798,7 +2798,8 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb)
break;
case MPA_REQ_SENT:
(void)stop_ep_timer(ep);
- if (mpa_rev == 1 || (mpa_rev == 2 && ep->tried_with_mpa_v1))
+ if (status != CPL_ERR_CONN_RESET || mpa_rev == 1 ||
+ (mpa_rev == 2 && ep->tried_with_mpa_v1))
connect_reply_upcall(ep, -ECONNRESET);
else {
/*