aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb3/iwch_cm.c
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2009-02-10 16:38:57 -0800
committerRoland Dreier <rolandd@cisco.com>2009-02-10 16:38:57 -0800
commit42fb61f02f9bdc476c7a76d3cce0400d989f44c5 (patch)
tree1b65628292881e77e81f6e1bdc6aed64b38f0646 /drivers/infiniband/hw/cxgb3/iwch_cm.c
parentRDMA/cxgb3: sgl/pbl offset calculation needs 64 bits (diff)
downloadlinux-dev-42fb61f02f9bdc476c7a76d3cce0400d989f44c5.tar.xz
linux-dev-42fb61f02f9bdc476c7a76d3cce0400d989f44c5.zip
RDMA/cxgb3: Connection termination fixes
The poll and flush code needs to handle all send opcodes: SEND, SEND_WITH_SE, SEND_WITH_INV, and SEND_WITH_SE_INV. Ignore TERM indications if the connection already gone. Ignore HW receive completions if the RQ is empty. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_cm.c')
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_cm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
index 44e936e48a31..8699947aaf6c 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
@@ -1678,6 +1678,9 @@ static int terminate(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
{
struct iwch_ep *ep = ctx;
+ if (state_read(&ep->com) != FPDU_MODE)
+ return CPL_RET_BUF_DONE;
+
PDBG("%s ep %p\n", __func__, ep);
skb_pull(skb, sizeof(struct cpl_rdma_terminate));
PDBG("%s saving %d bytes of term msg\n", __func__, skb->len);