Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/dev/pci Pull up following revision(s) (requested by m...
details: https://anonhg.NetBSD.org/src/rev/d9c5dcb160b8
branches: netbsd-7
changeset: 799229:d9c5dcb160b8
user: riz <riz%NetBSD.org@localhost>
date: Sun Apr 19 06:50:22 2015 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #698):
sys/dev/pci/if_wm.c: revision 1.316
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 7bf3384bc7d9 -r d9c5dcb160b8 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Sun Apr 19 06:46:42 2015 +0000
+++ b/sys/dev/pci/if_wm.c Sun Apr 19 06:50:22 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.289.2.5 2015/04/16 06:10:43 snj Exp $ */
+/* $NetBSD: if_wm.c,v 1.289.2.6 2015/04/19 06:50:22 riz 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.289.2.5 2015/04/16 06:10:43 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.289.2.6 2015/04/19 06:50:22 riz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -6397,8 +6397,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.
*/
@@ -6407,30 +6408,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:
@@ -6467,6 +6454,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