Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev - Drop the host wakeup bit after resetting PHY on PC...
details: https://anonhg.NetBSD.org/src/rev/79b54e98c64f
branches: trunk
changeset: 818599:79b54e98c64f
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Oct 19 08:22:57 2016 +0000
description:
- Drop the host wakeup bit after resetting PHY on PCH and newer devices.
- Increase delay while toggling LANPHYPC
diffstat:
sys/dev/mii/inbmphyreg.h | 4 +++-
sys/dev/pci/if_wm.c | 17 +++++++++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
diffs (64 lines):
diff -r 83f7b3970be6 -r 79b54e98c64f sys/dev/mii/inbmphyreg.h
--- a/sys/dev/mii/inbmphyreg.h Wed Oct 19 08:18:38 2016 +0000
+++ b/sys/dev/mii/inbmphyreg.h Wed Oct 19 08:22:57 2016 +0000
@@ -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 @@
#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 -r 83f7b3970be6 -r 79b54e98c64f sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Wed Oct 19 08:18:38 2016 +0000
+++ b/sys/dev/pci/if_wm.c Wed Oct 19 08:22:57 2016 +0000
@@ -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 @@
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 @@
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);
Home |
Main Index |
Thread Index |
Old Index