aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_ib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_ib.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 0ec28c302fbf..1a77e79f6b43 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -553,6 +553,14 @@ void ipoib_drain_cq(struct net_device *dev)
553 do { 553 do {
554 n = ib_poll_cq(priv->cq, IPOIB_NUM_WC, priv->ibwc); 554 n = ib_poll_cq(priv->cq, IPOIB_NUM_WC, priv->ibwc);
555 for (i = 0; i < n; ++i) { 555 for (i = 0; i < n; ++i) {
556 /*
557 * Convert any successful completions to flush
558 * errors to avoid passing packets up the
559 * stack after bringing the device down.
560 */
561 if (priv->ibwc[i].status == IB_WC_SUCCESS)
562 priv->ibwc[i].status = IB_WC_WR_FLUSH_ERR;
563
556 if (priv->ibwc[i].wr_id & IPOIB_CM_OP_SRQ) 564 if (priv->ibwc[i].wr_id & IPOIB_CM_OP_SRQ)
557 ipoib_cm_handle_rx_wc(dev, priv->ibwc + i); 565 ipoib_cm_handle_rx_wc(dev, priv->ibwc + i);
558 else if (priv->ibwc[i].wr_id & IPOIB_OP_RECV) 566 else if (priv->ibwc[i].wr_id & IPOIB_OP_RECV)