Module Name: src Committed By: msaitoh Date: Fri May 22 03:15:43 UTC 2015
Modified Files: src/sys/dev/pci: if_wm.c if_wmreg.h Log Message: - Currently, WM_F_EEE bit is not set on all chips. it's intened to not to use all of EEE fuction 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. To generate a diff of this commit: cvs rdiff -u -r1.321 -r1.322 src/sys/dev/pci/if_wm.c cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/if_wmreg.h 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/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.321 src/sys/dev/pci/if_wm.c:1.322 --- src/sys/dev/pci/if_wm.c:1.321 Sat May 16 22:41:59 2015 +++ src/sys/dev/pci/if_wm.c Fri May 22 03:15:43 2015 @@ -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 @@ wm_reset(struct wm_softc *sc) /* 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 @@ wm_set_eee_i350(struct wm_softc *sc) | 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); } Index: src/sys/dev/pci/if_wmreg.h diff -u src/sys/dev/pci/if_wmreg.h:1.71 src/sys/dev/pci/if_wmreg.h:1.72 --- src/sys/dev/pci/if_wmreg.h:1.71 Sat May 16 22:41:59 2015 +++ src/sys/dev/pci/if_wmreg.h Fri May 22 03:15:43 2015 @@ -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 @@ struct livengood_tcpip_ctxdesc { #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 */