Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci - Currently, WM_F_EEE bit is not set on all chip...
details: https://anonhg.NetBSD.org/src/rev/de3fc6fe00d7
branches: trunk
changeset: 338406:de3fc6fe00d7
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri May 22 03:15:43 2015 +0000
description:
- Currently, WM_F_EEE bit is not set on all chips. it's intended to not
to use all of EEE fuctions but wm_set_eee_i350() leaves IPCNFG_10BASE_TE
bit and it causes link negotiation problem on some old switches. Disable
10BASE-Te function, too.
- Call wm_set_eee_i350() on some chips, too.
diffstat:
sys/dev/pci/if_wm.c | 7 ++++---
sys/dev/pci/if_wmreg.h | 3 ++-
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (52 lines):
diff -r ec5de1c69394 -r de3fc6fe00d7 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Fri May 22 01:18:22 2015 +0000
+++ b/sys/dev/pci/if_wm.c Fri May 22 03:15:43 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.321 2015/05/16 22:41:59 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.322 2015/05/22 03:15:43 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.321 2015/05/16 22:41:59 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.322 2015/05/22 03:15:43 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -3807,7 +3807,7 @@
/* reload sc_ctrl */
sc->sc_ctrl = CSR_READ(sc, WMREG_CTRL);
- if (sc->sc_type == WM_T_I350)
+ if ((sc->sc_type >= WM_T_I350) && (sc->sc_type <= WM_T_I211))
wm_set_eee_i350(sc);
/* dummy read from WUC */
@@ -9592,6 +9592,7 @@
| EEER_LPI_FC);
} else {
ipcnfg &= ~(IPCNFG_EEE_1G_AN | IPCNFG_EEE_100M_AN);
+ ipcnfg &= ~IPCNFG_10BASE_TE;
eeer &= ~(EEER_TX_LPI_EN | EEER_RX_LPI_EN
| EEER_LPI_FC);
}
diff -r ec5de1c69394 -r de3fc6fe00d7 sys/dev/pci/if_wmreg.h
--- a/sys/dev/pci/if_wmreg.h Fri May 22 01:18:22 2015 +0000
+++ b/sys/dev/pci/if_wmreg.h Fri May 22 03:15:43 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wmreg.h,v 1.71 2015/05/16 22:41:59 msaitoh Exp $ */
+/* $NetBSD: if_wmreg.h,v 1.72 2015/05/22 03:15:43 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -639,6 +639,7 @@
#define EEER_EEER_TX_LPI_STATUS 0x80000000 /* EEER Tx in LPI state */
#define WMREG_EEE_SU 0x0e34 /* EEE Setup */
#define WMREG_IPCNFG 0x0e38 /* Internal PHY Configuration */
+#define IPCNFG_10BASE_TE 0x00000002 /* IPCNFG 10BASE-Te low power op. */
#define IPCNFG_EEE_100M_AN 0x00000004 /* IPCNFG EEE Ena 100M AN */
#define IPCNFG_EEE_1G_AN 0x00000008 /* IPCNFG EEE Ena 1G AN */
Home |
Main Index |
Thread Index |
Old Index