mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-25 06:39:39 +07:00
RDMA/qedr: Don't reset QP when queues aren't flushed
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: Ram Amrani <Ram.Amrani@cavium.com> Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
c78c314961
commit
933e6dcaa0
@ -1733,6 +1733,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;
|
||||||
|
Loading…
Reference in New Issue
Block a user