RDMA/iw_cxgb4: Add missing error codes for act open cmd
authorHariprasad S <hariprasad@chelsio.com>
Thu, 9 Jun 2016 19:35:14 +0000 (01:05 +0530)
committerDoug Ledford <dledford@redhat.com>
Thu, 23 Jun 2016 14:44:17 +0000 (10:44 -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
drivers/net/ethernet/chelsio/cxgb4/t4_msg.h

index 25236fc7dc929992061b71d8fc66ffd5f6b00ceb..4819314ef510e1dd6f7d40d80f5351aa07a905ef 100644 (file)
@@ -2016,12 +2016,17 @@ static int send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid)
 }
 
 /*
- * Return whether a failed active open has allocated a TID
+ * Some of the error codes above implicitly indicate that there is no TID
+ * allocated with the result of an ACT_OPEN.  We use this predicate to make
+ * that explicit.
  */
 static inline int act_open_has_tid(int status)
 {
-       return status != CPL_ERR_TCAM_FULL && status != CPL_ERR_CONN_EXIST &&
-              status != CPL_ERR_ARP_MISS;
+       return (status != CPL_ERR_TCAM_PARITY &&
+               status != CPL_ERR_TCAM_MISS &&
+               status != CPL_ERR_TCAM_FULL &&
+               status != CPL_ERR_CONN_EXIST_SYNRECV &&
+               status != CPL_ERR_CONN_EXIST);
 }
 
 /* Returns whether a CPL status conveys negative advice.
index 4705e2dea42342d870fff93ab3d070e08a5ac715..e0ebe1378cb22eeaf7dad5d8b85ac1ed0c5ca528 100644 (file)
@@ -104,6 +104,8 @@ enum {
 
 enum CPL_error {
        CPL_ERR_NONE               = 0,
+       CPL_ERR_TCAM_PARITY        = 1,
+       CPL_ERR_TCAM_MISS          = 2,
        CPL_ERR_TCAM_FULL          = 3,
        CPL_ERR_BAD_LENGTH         = 15,
        CPL_ERR_BAD_ROUTE          = 18,