Module Name: src Committed By: msaitoh Date: Wed Oct 19 08:22:57 UTC 2016
Modified Files: src/sys/dev/mii: inbmphyreg.h src/sys/dev/pci: if_wm.c Log Message: - Drop the host wakeup bit after resetting PHY on PCH and newer devices. - Increase delay while toggling LANPHYPC To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/mii/inbmphyreg.h cvs rdiff -u -r1.418 -r1.419 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/mii/inbmphyreg.h diff -u src/sys/dev/mii/inbmphyreg.h:1.5 src/sys/dev/mii/inbmphyreg.h:1.6 --- src/sys/dev/mii/inbmphyreg.h:1.5 Tue Sep 20 09:24:12 2016 +++ src/sys/dev/mii/inbmphyreg.h Wed Oct 19 08:22:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: inbmphyreg.h,v 1.5 2016/09/20 09:24:12 msaitoh Exp $ */ +/* $NetBSD: inbmphyreg.h,v 1.6 2016/10/19 08:22:57 msaitoh Exp $ */ /******************************************************************************* Copyright (c) 2001-2005, Intel Corporation All rights reserved. @@ -95,6 +95,8 @@ POSSIBILITY OF SUCH DAMAGE. #define HV_KMRN_MODE_CTRL BME1000_REG(BM_PORT_CTRL_PAGE, 16) #define HV_KMRN_MDIO_SLOW 0x0400 +#define BM_PORT_GEN_CFG BME1000_REG(BM_PORT_CTRL_PAGE, 17) + #define IGP3_KMRN_DIAG BME1000_REG(770, 19) #define IGP3_KMRN_DIAG_PCS_LOCK_LOSS (1 << 1) Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.418 src/sys/dev/pci/if_wm.c:1.419 --- src/sys/dev/pci/if_wm.c:1.418 Tue Oct 11 15:48:17 2016 +++ src/sys/dev/pci/if_wm.c Wed Oct 19 08:22:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.418 2016/10/11 15:48:17 skrll Exp $ */ +/* $NetBSD: if_wm.c,v 1.419 2016/10/19 08:22:57 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -84,7 +84,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.418 2016/10/11 15:48:17 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.419 2016/10/19 08:22:57 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -3900,8 +3900,17 @@ wm_reset(struct wm_softc *sc) break; } - if (phy_reset != 0) + if (phy_reset != 0) { wm_get_cfg_done(sc); + delay(10 * 1000); + if (sc->sc_type >= WM_T_PCH) { + reg = wm_gmii_hv_readreg(sc->sc_dev, 2, + BM_PORT_GEN_CFG); + reg &= ~BM_WUC_HOST_WU_BIT; + wm_gmii_hv_writereg(sc->sc_dev, 2, + BM_PORT_GEN_CFG, reg); + } + } /* reload EEPROM */ switch (sc->sc_type) { @@ -11464,7 +11473,7 @@ wm_smbustopci(struct wm_softc *sc) sc->sc_ctrl &= ~CTRL_LANPHYPC_VALUE; CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl); CSR_WRITE_FLUSH(sc); - delay(10); + delay(1000); sc->sc_ctrl &= ~CTRL_LANPHYPC_OVERRIDE; CSR_WRITE(sc, WMREG_CTRL, sc->sc_ctrl); CSR_WRITE_FLUSH(sc);