From be36ceea1b8f75f7f537e77dddb75666671fef8f Mon Sep 17 00:00:00 2001 From: Kevin Bowling Date: Wed, 16 Sep 2026 19:30:01 -0700 Subject: [PATCH] enic: Clean the completion ring matching each queue The transmit stop loop cleaned the receive completion ring, and the receive stop loop cleaned the transmit completion ring. Use enic_cq_wq() for transmit queues and enic_cq_rq() for receive queues, matching the queue indices used by the remaining ring bookkeeping. MFC after: 2 weeks Sponsored by: BBOX.io --- sys/dev/enic/if_enic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/enic/if_enic.c b/sys/dev/enic/if_enic.c index 82bed15e3f67..aa80ee6bafde 100644 --- a/sys/dev/enic/if_enic.c +++ b/sys/dev/enic/if_enic.c @@ -945,7 +945,7 @@ enic_stop(if_ctx_t ctx) for (index = 0; index < scctx->isc_ntxqsets; index++) { enic_stop_wq(enic, index); vnic_wq_clean(&enic->wq[index]); - vnic_cq_clean(&enic->cq[enic_cq_rq(enic, index)]); + vnic_cq_clean(&enic->cq[enic_cq_wq(enic, index)]); wq = &softc->enic.wq[index]; wq->ring.desc_avail = wq->ring.desc_count - 1; @@ -961,7 +961,7 @@ enic_stop(if_ctx_t ctx) for (index = 0; index < scctx->isc_nrxqsets; index++) { enic_stop_rq(enic, index); vnic_rq_clean(&enic->rq[index]); - vnic_cq_clean(&enic->cq[enic_cq_wq(enic, index)]); + vnic_cq_clean(&enic->cq[enic_cq_rq(enic, index)]); rq = &softc->enic.rq[index]; cq_rq = enic_cq_rq(&softc->enic, index);