aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2007-06-21 19:17:57 -0400
committerRoland Dreier <rolandd@cisco.com>2007-07-09 23:12:26 -0400
commit96d0e4931e264012f57a2ae8f7c4697bfa55386a (patch)
treef5b5d0fb3f7bf3897ea0ac16575929b85ef4cdac
parent6eda48d1e82f901d977a405e43a849dc79968d61 (diff)
RDMA/cxgb3: Don't post TID_RELEASE message
The LLD does this for us in cxgb3_remove_tid(). Also fixed active open failure cases where we also shouldn't be releasing the TID. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_cm.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index 4d7c277d7cc4..228721f23ce4 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -254,8 +254,6 @@ static void release_ep_resources(struct iwch_ep *ep)
254 cxgb3_remove_tid(ep->com.tdev, (void *)ep, ep->hwtid); 254 cxgb3_remove_tid(ep->com.tdev, (void *)ep, ep->hwtid);
255 dst_release(ep->dst); 255 dst_release(ep->dst);
256 l2t_release(L2DATA(ep->com.tdev), ep->l2t); 256 l2t_release(L2DATA(ep->com.tdev), ep->l2t);
257 if (ep->com.tdev->type == T3B)
258 release_tid(ep->com.tdev, ep->hwtid, NULL);
259 put_ep(&ep->com); 257 put_ep(&ep->com);
260} 258}
261 259
@@ -1103,6 +1101,15 @@ static int abort_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1103 return CPL_RET_BUF_DONE; 1101 return CPL_RET_BUF_DONE;
1104} 1102}
1105 1103
1104/*
1105 * Return whether a failed active open has allocated a TID
1106 */
1107static inline int act_open_has_tid(int status)
1108{
1109 return status != CPL_ERR_TCAM_FULL && status != CPL_ERR_CONN_EXIST &&
1110 status != CPL_ERR_ARP_MISS;
1111}
1112
1106static int act_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) 1113static int act_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1107{ 1114{
1108 struct iwch_ep *ep = ctx; 1115 struct iwch_ep *ep = ctx;
@@ -1112,7 +1119,7 @@ static int act_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1112 status2errno(rpl->status)); 1119 status2errno(rpl->status));
1113 connect_reply_upcall(ep, status2errno(rpl->status)); 1120 connect_reply_upcall(ep, status2errno(rpl->status));
1114 state_set(&ep->com, DEAD); 1121 state_set(&ep->com, DEAD);
1115 if (ep->com.tdev->type == T3B) 1122 if (ep->com.tdev->type == T3B && act_open_has_tid(rpl->status))
1116 release_tid(ep->com.tdev, GET_TID(rpl), NULL); 1123 release_tid(ep->com.tdev, GET_TID(rpl), NULL);
1117 cxgb3_free_atid(ep->com.tdev, ep->atid); 1124 cxgb3_free_atid(ep->com.tdev, ep->atid);
1118 dst_release(ep->dst); 1125 dst_release(ep->dst);