From 0efb1a464f1163767307bad0ca00a83885469124 Mon Sep 17 00:00:00 2001 From: Stephen Hurd Date: Wed, 14 Nov 2018 20:36:18 +0000 Subject: Clear RX completion queue state veriables in iflib_stop() iflib_stop() was not resetting the rxq completion queue state variables. This meant that for any driver that has receive completion queues, after a reinit, iflib would start asking what's available on the rx side starting at whatever the completion queue index was prior to the stop, instead of at 0. Submitted by: pkelsey Reported by: pkelsey MFC after: 3 days Sponsored by: Limelight Networks --- sys/net/iflib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/net/iflib.c') diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 1925a6d0f7c5..537e52aad2de 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2414,6 +2414,7 @@ iflib_stop(if_ctx_t ctx) for (i = 0; i < scctx->isc_nrxqsets; i++, rxq++) { /* make sure all transmitters have completed before proceeding XXX */ + rxq->ifr_cq_gen = rxq->ifr_cq_cidx = rxq->ifr_cq_pidx = 0; for (j = 0, di = rxq->ifr_ifdi; j < sctx->isc_nrxqs; j++, di++) bzero((void *)di->idi_vaddr, di->idi_size); /* also resets the free lists pidx/cidx */ -- cgit v1.2.3