git: d82cb5c608ae - main - cxgbe(4): Make sure that the tracing filters are usable after restart.

From: Navdeep Parhar <np_at_FreeBSD.org>
Date: Wed, 11 Sep 2024 19:22:53 UTC
The branch main has been updated by np:

URL: https://cgit.FreeBSD.org/src/commit/?id=d82cb5c608ae9aaced4cb459ca511e62c64dbf74

commit d82cb5c608ae9aaced4cb459ca511e62c64dbf74
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2024-09-11 08:01:38 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2024-09-11 19:12:32 +0000

    cxgbe(4): Make sure that the tracing filters are usable after restart.
    
    The destination queue for tracing filters is destroyed during stop or
    suspend and the software state needs to reflect this.  A new destination
    queue will be setup when the adapter resumes operation.
    
    MFC after:      1 week
    Sponsored by:   Chelsio Communications
---
 sys/dev/cxgbe/t4_main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 540edbb568c0..4412e1ab95fb 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -2091,6 +2091,11 @@ stop_lld(struct adapter *sc)
 			TXQ_UNLOCK(wrq);
 			quiesce_wrq(wrq);
 		}
+
+		if (pi->flags & HAS_TRACEQ) {
+			pi->flags &= ~HAS_TRACEQ;
+			sc->traceq = -1;
+		}
 	}
 	if (sc->flags & FULL_INIT_DONE) {
 		/* Firmware event queue */