Date: Tue, 31 May 2011 01:30:58 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222516 - head/sys/dev/msk Message-ID: <201105310130.p4V1Uwib001820@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Tue May 31 01:30:58 2011 New Revision: 222516 URL: http://svn.freebsd.org/changeset/base/222516 Log: Correctly check MAC running status before disabling TX/RX MACs. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Tue May 31 00:25:52 2011 (r222515) +++ head/sys/dev/msk/if_msk.c Tue May 31 01:30:58 2011 (r222516) @@ -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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105310130.p4V1Uwib001820>