RDMA/iw_cxgb4: Handle ret value of process_mpa_reply() in rx_data
authorHariprasad S <hariprasad@chelsio.com>
Fri, 6 May 2016 16:48:08 +0000 (22:18 +0530)
committerDoug Ledford <dledford@redhat.com>
Fri, 13 May 2016 23:38:10 +0000 (19:38 -0400)
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/cm.c

index 4ee10547a4e46e15c5a34fde81f124967595d967..0502fac4a2148c7ecb6425d984cfe3561a9da040 100644 (file)
@@ -1864,7 +1864,7 @@ static int rx_data(struct c4iw_dev *dev, struct sk_buff *skb)
                break;
        case MPA_REQ_WAIT:
                ep->rcv_seq += dlen;
-               process_mpa_request(ep, skb);
+               disconnect = process_mpa_request(ep, skb);
                break;
        case FPDU_MODE: {
                struct c4iw_qp_attributes attrs;
@@ -1885,7 +1885,7 @@ static int rx_data(struct c4iw_dev *dev, struct sk_buff *skb)
        }
        mutex_unlock(&ep->com.mutex);
        if (disconnect)
-               c4iw_ep_disconnect(ep, 0, GFP_KERNEL);
+               c4iw_ep_disconnect(ep, disconnect == 2, GFP_KERNEL);
        c4iw_put_ep(&ep->com);
        return 0;
 }