Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix a bug that newer revision of I218-{LM, V} use...
details: https://anonhg.NetBSD.org/src/rev/02e0d506e1a3
branches: trunk
changeset: 337487:02e0d506e1a3
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Apr 17 02:54:15 2015 +0000
description:
Fix a bug that newer revision of I218-{LM,V} use wrong PHY access functions.
The problem only occured on devices that the PCI device ID was 0x15a[0123].
diffstat:
sys/dev/pci/if_wm.c | 28 ++++++++++------------------
1 files changed, 10 insertions(+), 18 deletions(-)
diffs (73 lines):
diff -r ebffe2c7aa79 -r 02e0d506e1a3 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Thu Apr 16 21:50:35 2015 +0000
+++ b/sys/dev/pci/if_wm.c Fri Apr 17 02:54:15 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.315 2015/04/13 16:33:25 riastradh Exp $ */
+/* $NetBSD: if_wm.c,v 1.316 2015/04/17 02:54:15 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.315 2015/04/13 16:33:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.316 2015/04/17 02:54:15 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -6414,8 +6414,9 @@
* For some devices, we can determine the PHY access method
* from sc_type.
*
- * For ICH8 variants, it's difficult to determine the PHY access
- * method by sc_type, so use the PCI product ID for some devices.
+ * For ICH and PCH variants, it's difficult to determine the PHY
+ * access method by sc_type, so use the PCI product ID for some
+ * devices.
* For other ICH8 variants, try to use igp's method. If the PHY
* can't detect, then use bm's method.
*/
@@ -6424,30 +6425,16 @@
case PCI_PRODUCT_INTEL_PCH_M_LC:
/* 82577 */
sc->sc_phytype = WMPHY_82577;
- mii->mii_readreg = wm_gmii_hv_readreg;
- mii->mii_writereg = wm_gmii_hv_writereg;
break;
case PCI_PRODUCT_INTEL_PCH_D_DM:
case PCI_PRODUCT_INTEL_PCH_D_DC:
/* 82578 */
sc->sc_phytype = WMPHY_82578;
- mii->mii_readreg = wm_gmii_hv_readreg;
- mii->mii_writereg = wm_gmii_hv_writereg;
break;
case PCI_PRODUCT_INTEL_PCH2_LV_LM:
case PCI_PRODUCT_INTEL_PCH2_LV_V:
/* 82579 */
sc->sc_phytype = WMPHY_82579;
- mii->mii_readreg = wm_gmii_hv_readreg;
- mii->mii_writereg = wm_gmii_hv_writereg;
- break;
- case PCI_PRODUCT_INTEL_I217_LM:
- case PCI_PRODUCT_INTEL_I217_V:
- case PCI_PRODUCT_INTEL_I218_LM:
- case PCI_PRODUCT_INTEL_I218_V:
- /* I21[78] */
- mii->mii_readreg = wm_gmii_hv_readreg;
- mii->mii_writereg = wm_gmii_hv_writereg;
break;
case PCI_PRODUCT_INTEL_82801I_BM:
case PCI_PRODUCT_INTEL_82801J_R_BM_LM:
@@ -6484,6 +6471,11 @@
}
break;
}
+ if ((sc->sc_type >= WM_T_PCH) && (sc->sc_type <= WM_T_PCH_LPT)) {
+ /* All PCH* use _hv_ */
+ mii->mii_readreg = wm_gmii_hv_readreg;
+ mii->mii_writereg = wm_gmii_hv_writereg;
+ }
mii->mii_statchg = wm_gmii_statchg;
wm_gmii_reset(sc);
Home |
Main Index |
Thread Index |
Old Index