RDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2
authorKumar Sanghvi <kumaras@chelsio.com>
Mon, 28 Nov 2011 16:39:15 +0000 (22:09 +0530)
committerRoland Dreier <roland@purestorage.com>
Mon, 28 Nov 2011 19:58:07 +0000 (11:58 -0800)
Fix logic so that we don't retry with MPAv1 once we have done that
already.  Otherwise, we end up retrying with MPAv1 even when its not
needed on getting peer aborts - and this could lead to kernel panic.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/cm.c

index b36cdac9c558a35aa78f2061e9f7435dc1504754..760b2fe29365b476e445dbddfa48de0a6e08378e 100644 (file)
@@ -542,8 +542,10 @@ static void send_mpa_req(struct c4iw_ep *ep, struct sk_buff *skb,
                     (mpa_rev_to_use == 2 ? MPA_ENHANCED_RDMA_CONN : 0);
        mpa->private_data_size = htons(ep->plen);
        mpa->revision = mpa_rev_to_use;
-       if (mpa_rev_to_use == 1)
+       if (mpa_rev_to_use == 1) {
                ep->tried_with_mpa_v1 = 1;
+               ep->retry_with_mpa_v1 = 0;
+       }
 
        if (mpa_rev_to_use == 2) {
                mpa->private_data_size +=