diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2016-10-19 08:22:57 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2016-10-19 08:22:57 +0000 |
| commit | 55f7e7fbb1d95bf0395245bd628dfd7bd54691ff (patch) | |
| tree | f51f0066a73750b475d7217b9a3090f914f42258 /sys/dev | |
| parent | 303518f28c47715e84892a811786f85cefb72633 (diff) | |
- Drop the host wakeup bit after resetting PHY on PCH and newer devices.
- Increase delay while toggling LANPHYPC
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/mii/inbmphyreg.h | 4 | ||||
| -rw-r--r-- | sys/dev/pci/if_wm.c | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/sys/dev/mii/inbmphyreg.h b/sys/dev/mii/inbmphyreg.h index 2a3334f73f2..b582c74513d 100644 --- a/sys/dev/mii/inbmphyreg.h +++ b/sys/dev/mii/inbmphyreg.h @@ -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) diff --git a/sys/dev/pci/if_wm.c b/sys/dev/pci/if_wm.c index ad475557ece..f7d2386a0e1 100644 --- a/sys/dev/pci/if_wm.c +++ b/sys/dev/pci/if_wm.c @@ -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); |
