aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2007-04-26 16:21:20 -0400
committerRoland Dreier <rolandd@cisco.com>2007-05-07 00:18:08 -0400
commitaff9e39d97585486764572ab2f3bf5dfce18c660 (patch)
tree63269f4fae6fba0b86432620a82340033622e5f8 /drivers/infiniband/hw
parent60be4b5966e22040f97db9dada72841bf90479d1 (diff)
RDMA/cxgb3: Support for new abort logic
The HW now posts 2 ABORT_RPL and/or PEER_ABORT_REQ messages. We need to handle them by silenty dropping the 1st but mark that we're ready for the final message. This plugs some close races between the uP and HW. Also update the minimum required firmware version. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_cm.c18
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_cm.h6
2 files changed, 24 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index a02be40ee29b..b2faff5abce8 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -1109,6 +1109,15 @@ static int abort_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1109 1109
1110 PDBG("%s ep %p\n", __FUNCTION__, ep); 1110 PDBG("%s ep %p\n", __FUNCTION__, ep);
1111 1111
1112 /*
1113 * We get 2 abort replies from the HW. The first one must
1114 * be ignored except for scribbling that we need one more.
1115 */
1116 if (!(ep->flags & ABORT_REQ_IN_PROGRESS)) {
1117 ep->flags |= ABORT_REQ_IN_PROGRESS;
1118 return CPL_RET_BUF_DONE;
1119 }
1120
1112 close_complete_upcall(ep); 1121 close_complete_upcall(ep);
1113 state_set(&ep->com, DEAD); 1122 state_set(&ep->com, DEAD);
1114 release_ep_resources(ep); 1123 release_ep_resources(ep);
@@ -1476,6 +1485,15 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
1476 int ret; 1485 int ret;
1477 int state; 1486 int state;
1478 1487
1488 /*
1489 * We get 2 peer aborts from the HW. The first one must
1490 * be ignored except for scribbling that we need one more.
1491 */
1492 if (!(ep->flags & PEER_ABORT_IN_PROGRESS)) {
1493 ep->flags |= PEER_ABORT_IN_PROGRESS;
1494 return CPL_RET_BUF_DONE;
1495 }
1496
1479 if (is_neg_adv_abort(req->status)) { 1497 if (is_neg_adv_abort(req->status)) {
1480 PDBG("%s neg_adv_abort ep %p tid %d\n", __FUNCTION__, ep, 1498 PDBG("%s neg_adv_abort ep %p tid %d\n", __FUNCTION__, ep,
1481 ep->hwtid); 1499 ep->hwtid);
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.h b/drivers/infiniband/hw/cxgb3/iwch_cm.h
index 0c6f281bd4a0..21a388c313cf 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.h
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.h
@@ -143,6 +143,11 @@ enum iwch_ep_state {
143 DEAD, 143 DEAD,
144}; 144};
145 145
146enum iwch_ep_flags {
147 PEER_ABORT_IN_PROGRESS = (1 << 0),
148 ABORT_REQ_IN_PROGRESS = (1 << 1),
149};
150
146struct iwch_ep_common { 151struct iwch_ep_common {
147 struct iw_cm_id *cm_id; 152 struct iw_cm_id *cm_id;
148 struct iwch_qp *qp; 153 struct iwch_qp *qp;
@@ -181,6 +186,7 @@ struct iwch_ep {
181 u16 plen; 186 u16 plen;
182 u32 ird; 187 u32 ird;
183 u32 ord; 188 u32 ord;
189 u32 flags;
184}; 190};
185 191
186static inline struct iwch_ep *to_ep(struct iw_cm_id *cm_id) 192static inline struct iwch_ep *to_ep(struct iw_cm_id *cm_id)