git: b786acdc131d - stable/12 - if_dwc: Use dwc_enable_mac in dwc_stop_locked

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

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

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

    if_dwc: Use dwc_enable_mac in dwc_stop_locked
    
    No functional changes intended
    
    (cherry picked from commit 86c7bc68ed20446600c5cc98f53c75cd90468a5a)
---
 sys/dev/dwc/if_dwc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c
index 74e5922ff828..aa8fbc9a12b3 100644
--- a/sys/dev/dwc/if_dwc.c
+++ b/sys/dev/dwc/if_dwc.c
@@ -380,10 +380,7 @@ dwc_stop_locked(struct dwc_softc *sc)
 	reg |= (MODE_FTF);
 	WRITE4(sc, OPERATION_MODE, reg);
 
-	/* Stop transmitters */
-	reg = READ4(sc, MAC_CONFIGURATION);
-	reg &= ~(CONF_TE | CONF_RE);
-	WRITE4(sc, MAC_CONFIGURATION, reg);
+	dwc_enable_mac(sc, false);
 
 	/* Stop DMA RX */
 	reg = READ4(sc, OPERATION_MODE);