summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe_comp.c
diff options
context:
space:
mode:
authorBob Pearson <rpearsonhpe@gmail.com>2023-04-04 23:26:08 -0500
committerJason Gunthorpe <jgg@nvidia.com>2023-04-17 16:01:44 -0300
commitf55efc2ed206eedfed08e1c8f8552f64fc3a11dd (patch)
tree0b32fe0dbdfcc9de6efc82657c46361f79ab788c /drivers/infiniband/sw/rxe/rxe_comp.c
parenta588429a66e92960b195b8dceb3fc5477a2b2f80 (diff)
downloadlinux-f55efc2ed206eedfed08e1c8f8552f64fc3a11dd.tar.gz
linux-f55efc2ed206eedfed08e1c8f8552f64fc3a11dd.tar.bz2
linux-f55efc2ed206eedfed08e1c8f8552f64fc3a11dd.zip
RDMA/rxe: Remove qp->comp.state
The rxe driver has four different QP state variables, qp->attr.qp_state, qp->req.state, qp->comp.state, and qp->resp.state. All of these basically carry the same information. This patch replaces uses of qp->comp.state by qp->attr.qp_state. This is the second of three patches which will remove all but the qp->attr.qp_state variable. This will bring the driver closer to the IBA description. Link: https://lore.kernel.org/r/20230405042611.6467-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_comp.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_comp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c
index 2c70cdcd55dc..173ebfe784e6 100644
--- a/drivers/infiniband/sw/rxe/rxe_comp.c
+++ b/drivers/infiniband/sw/rxe/rxe_comp.c
@@ -619,10 +619,10 @@ int rxe_completer(struct rxe_qp *qp)
enum comp_state state;
int ret;
- if (!qp->valid || qp->comp.state == QP_STATE_ERROR ||
- qp->comp.state == QP_STATE_RESET) {
- bool notify = qp->valid &&
- (qp->comp.state == QP_STATE_ERROR);
+ if (!qp->valid || qp_state(qp) == IB_QPS_ERR ||
+ qp_state(qp) == IB_QPS_RESET) {
+ bool notify = qp->valid && (qp_state(qp) == IB_QPS_ERR);
+
drain_resp_pkts(qp);
flush_send_queue(qp, notify);
goto exit;