mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
Correctly check MAC running status before disabling TX/RX MACs.
This commit is contained in:
parent
1dd53eaea3
commit
7c017a713e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=222516
@ -566,7 +566,7 @@ msk_miibus_statchg(device_t dev)
|
||||
msk_phy_writereg(sc_if, PHY_ADDR_MARV, PHY_MARV_INT_MASK, 0);
|
||||
/* Disable Rx/Tx MAC. */
|
||||
gmac = GMAC_READ_2(sc, sc_if->msk_port, GM_GP_CTRL);
|
||||
if ((GM_GPCR_RX_ENA | GM_GPCR_TX_ENA) != 0) {
|
||||
if ((gmac & (GM_GPCR_RX_ENA | GM_GPCR_TX_ENA)) != 0) {
|
||||
gmac &= ~(GM_GPCR_RX_ENA | GM_GPCR_TX_ENA);
|
||||
GMAC_WRITE_2(sc, sc_if->msk_port, GM_GP_CTRL, gmac);
|
||||
/* Read again to ensure writing. */
|
||||
|
Loading…
Reference in New Issue
Block a user