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.
Unified · Split
| @@ -1221,6 +1221,8 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, · 1220 unmodified lines | ||
| 1221 | 1221 | disconnect = 1; |
| 1222 | 1222 | c4iw_get_ep(&qhp->ep->com); |
| 1223 | 1223 | } |
| 1224 | + if (qhp->ibqp.uobject) | |
| 1225 | + t4_set_wq_in_error(&qhp->wq); | |
| 1224 | 1226 | ret = rdma_fini(rhp, qhp, ep); |
| 1225 | 1227 | if (ret) |
| 1226 | 1228 | goto err; |
| @@ -1237,6 +1239,8 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, · 10 unmodified lines | ||
| 1237 | 1239 | break; |
| 1238 | 1240 | case C4IW_QP_STATE_ERROR: |
| 1239 | 1241 | set_state(qhp, C4IW_QP_STATE_ERROR); |
| 1242 | + if (qhp->ibqp.uobject) | |
| 1243 | + t4_set_wq_in_error(&qhp->wq); | |
| 1240 | 1244 | if (!internal) { |
| 1241 | 1245 | abort = 1; |
| 1242 | 1246 | disconnect = 1; |