aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTom Tucker <tom@ogc.us>2011-10-25 07:08:30 -0400
committerRoland Dreier <roland@purestorage.com>2011-10-31 14:36:08 -0400
commitd32ae393dbf0daf778f9e33b0bc6591cd102391e (patch)
treea2f79e3e262ebb1454c737fc074e14b6f5e5a020 /drivers
parent581bbe2cd0694a935e0c3ccd7f011e10094f1df6 (diff)
RDMA/cxgb4: Mark QP in error before disabling the queue in firmware
QPs need to be moved to error before telling the firwmare to shutdown the queue. Otherwise, the application can submit WRs that will never get fetched by the hardware and never flushed by the driver. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Acked-by: Steve Wise <swsie@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/cxgb4/qp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 62c7262a9eb3..2466cfcc9ffc 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -1221,6 +1221,8 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
1221 disconnect = 1; 1221 disconnect = 1;
1222 c4iw_get_ep(&qhp->ep->com); 1222 c4iw_get_ep(&qhp->ep->com);
1223 } 1223 }
1224 if (qhp->ibqp.uobject)
1225 t4_set_wq_in_error(&qhp->wq);
1224 ret = rdma_fini(rhp, qhp, ep); 1226 ret = rdma_fini(rhp, qhp, ep);
1225 if (ret) 1227 if (ret)
1226 goto err; 1228 goto err;
@@ -1237,6 +1239,8 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
1237 break; 1239 break;
1238 case C4IW_QP_STATE_ERROR: 1240 case C4IW_QP_STATE_ERROR:
1239 set_state(qhp, C4IW_QP_STATE_ERROR); 1241 set_state(qhp, C4IW_QP_STATE_ERROR);
1242 if (qhp->ibqp.uobject)
1243 t4_set_wq_in_error(&qhp->wq);
1240 if (!internal) { 1244 if (!internal) {
1241 abort = 1; 1245 abort = 1;
1242 disconnect = 1; 1246 disconnect = 1;