git: 312e2bca2659 - stable/12 - if_dwc: Use if_setdrvflagbits to notify that we are running

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Thu, 11 Aug 2022 14:53:11 UTC
The branch stable/12 has been updated by mhorne:

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

commit 312e2bca2659b9045a7886241fce742742584155
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2020-11-20 11:27:08 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2022-08-11 14:52:02 +0000

    if_dwc: Use if_setdrvflagbits to notify that we are running
    
    No functional changes intended
    
    (cherry picked from commit b0cc649b95d8721612973ef05f48fc9622b98beb)
---
 sys/dev/dwc/if_dwc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c
index 6c15bf9e71df..e4270f7dd3de 100644
--- a/sys/dev/dwc/if_dwc.c
+++ b/sys/dev/dwc/if_dwc.c
@@ -481,12 +481,12 @@ dwc_init_locked(struct dwc_softc *sc)
 	if (ifp->if_drv_flags & IFF_DRV_RUNNING)
 		return;
 
-	ifp->if_drv_flags |= IFF_DRV_RUNNING;
-
 	dwc_setup_rxfilter(sc);
 	dwc_setup_core(sc);
 	dwc_init_dma(sc);
 
+	if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE);
+
 	/*
 	 * Call mii_mediachg() which will call back into dwc_miibus_statchg()
 	 * to set up the remaining config registers based on current media.