Commit 13a87589 authored by Ram Amrani's avatar Ram Amrani Committed by Greg Kroah-Hartman

RDMA/qedr: Don't reset QP when queues aren't flushed


[ Upstream commit 933e6dca ]

Fail QP state transition from error to reset if SQ/RQ are not empty
and still in the process of flushing out the queued work entries.
Signed-off-by: default avatarRam Amrani <Ram.Amrani@cavium.com>
Signed-off-by: default avatarMichal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bbf61096
...@@ -1729,6 +1729,14 @@ static int qedr_update_qp_state(struct qedr_dev *dev, ...@@ -1729,6 +1729,14 @@ static int qedr_update_qp_state(struct qedr_dev *dev,
/* ERR->XXX */ /* ERR->XXX */
switch (new_state) { switch (new_state) {
case QED_ROCE_QP_STATE_RESET: case QED_ROCE_QP_STATE_RESET:
if ((qp->rq.prod != qp->rq.cons) ||
(qp->sq.prod != qp->sq.cons)) {
DP_NOTICE(dev,
"Error->Reset with rq/sq not empty rq.prod=%x rq.cons=%x sq.prod=%x sq.cons=%x\n",
qp->rq.prod, qp->rq.cons, qp->sq.prod,
qp->sq.cons);
status = -EINVAL;
}
break; break;
default: default:
status = -EINVAL; status = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment