Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci 80003's SERDES is not the same as 82575's but th...
details: https://anonhg.NetBSD.org/src/rev/c51c6f897176
branches: trunk
changeset: 996236:c51c6f897176
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Jan 25 08:04:07 2019 +0000
description:
80003's SERDES is not the same as 82575's but the same as legacy devices.
Use the old methods on 80003.
XXX The reason why this bug existed is that our order of WM_T_* was little
different from FreeBSD's enum e1000_mac_type. From 80003 to PCH_CNP and from
82575 to I211 are swapped. I carefully read through if_wm.c and knew only
serdes related test were wrong. When we change WM_T_* to match FreeBSD's,
additional changes also will be required.
diffstat:
sys/dev/pci/if_wm.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r ccbf5f75ae86 -r c51c6f897176 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Fri Jan 25 03:50:13 2019 +0000
+++ b/sys/dev/pci/if_wm.c Fri Jan 25 08:04:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.619 2019/01/25 03:50:13 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.620 2019/01/25 08:04:07 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.619 2019/01/25 03:50:13 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.620 2019/01/25 08:04:07 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -3262,7 +3262,7 @@
if (sc->sc_flags & WM_F_HAS_MII)
mii_tick(&sc->sc_mii);
- else if ((sc->sc_type >= WM_T_82575)
+ else if ((sc->sc_type >= WM_T_82575) && (sc->sc_type <= WM_T_I211)
&& (sc->sc_mediatype == WM_MEDIATYPE_SERDES))
wm_serdes_tick(sc);
else
@@ -9235,7 +9235,7 @@
if (sc->sc_flags & WM_F_HAS_MII)
wm_linkintr_gmii(sc, icr);
else if ((sc->sc_mediatype == WM_MEDIATYPE_SERDES)
- && (sc->sc_type >= WM_T_82575))
+ && ((sc->sc_type >= WM_T_82575) && (sc->sc_type <= WM_T_I211)))
wm_linkintr_serdes(sc, icr);
else
wm_linkintr_tbi(sc, icr);
@@ -11608,7 +11608,7 @@
sc->sc_mii.mii_ifp = ifp;
sc->sc_ethercom.ec_mii = &sc->sc_mii;
- if ((sc->sc_type >= WM_T_82575)
+ if (((sc->sc_type >= WM_T_82575) && (sc->sc_type <= WM_T_I211))
&& (sc->sc_mediatype == WM_MEDIATYPE_SERDES))
ifmedia_init(&sc->sc_mii.mii_media, IFM_IMASK,
wm_serdes_mediachange, wm_serdes_mediastatus);
Home |
Main Index |
Thread Index |
Old Index