Module Name: src
Committed By: msaitoh
Date: Tue Nov 20 03:52:03 UTC 2018
Modified Files:
src/sys/dev/pci: if_wm.c
Log Message:
- Fix a bug that i82578 PHY can't detect correctly.
- Print PHY OUI and model number if a PHY's can't be identified.
XXX pullup-[78]
To generate a diff of this commit:
cvs rdiff -u -r1.598 -r1.599 src/sys/dev/pci/if_wm.c
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.598 src/sys/dev/pci/if_wm.c:1.599
--- src/sys/dev/pci/if_wm.c:1.598 Mon Nov 19 06:38:58 2018
+++ src/sys/dev/pci/if_wm.c Tue Nov 20 03:52:03 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.598 2018/11/19 06:38:58 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.599 2018/11/20 03:52:03 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.598 2018/11/19 06:38:58 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.599 2018/11/20 03:52:03 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -9564,7 +9564,7 @@ wm_gmii_setup_phytype(struct wm_softc *s
} else {
/* It's not the first call. Use PHY OUI and model */
switch (phy_oui) {
- case MII_OUI_ATHEROS: /* XXX ??? */
+ case MII_OUI_ATTANSIC: /* XXX ??? */
switch (phy_model) {
case 0x0004: /* XXX */
new_phytype = WMPHY_82578;
@@ -9641,8 +9641,9 @@ wm_gmii_setup_phytype(struct wm_softc *s
break;
}
if (new_phytype == WMPHY_UNKNOWN)
- aprint_verbose_dev(dev, "%s: unknown PHY model\n",
- __func__);
+ aprint_verbose_dev(dev,
+ "%s: unknown PHY model. OUI=%06x, model=%04x\n",
+ __func__, phy_oui, phy_model);
if ((sc->sc_phytype != WMPHY_UNKNOWN)
&& (sc->sc_phytype != new_phytype )) {