Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev igphy(4),ukphy(4): Set mii_mpd_* entries.
details: https://anonhg.NetBSD.org/src/rev/6e691abe3ad3
branches: trunk
changeset: 341300:6e691abe3ad3
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Oct 30 07:35:30 2015 +0000
description:
igphy(4),ukphy(4): Set mii_mpd_* entries.
wm(4): check PHY type correctly.
diffstat:
sys/dev/mii/igphy.c | 7 +++++--
sys/dev/mii/ukphy.c | 7 +++++--
sys/dev/pci/if_wm.c | 14 +++++---------
3 files changed, 15 insertions(+), 13 deletions(-)
diffs (91 lines):
diff -r a14dfeeb98d0 -r 6e691abe3ad3 sys/dev/mii/igphy.c
--- a/sys/dev/mii/igphy.c Fri Oct 30 03:18:10 2015 +0000
+++ b/sys/dev/mii/igphy.c Fri Oct 30 07:35:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: igphy.c,v 1.24 2015/08/24 23:55:04 pooka Exp $ */
+/* $NetBSD: igphy.c,v 1.25 2015/10/30 07:35:30 msaitoh Exp $ */
/*
* The Intel copyright applies to the analog register setup, and the
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.24 2015/08/24 23:55:04 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.25 2015/10/30 07:35:30 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_mii.h"
@@ -156,6 +156,9 @@
sc->mii_dev = self;
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
+ sc->mii_mpd_oui = MII_OUI(ma->mii_id1, ma->mii_id2);
+ sc->mii_mpd_model = MII_MODEL(ma->mii_id2);
+ sc->mii_mpd_rev = MII_REV(ma->mii_id2);
sc->mii_funcs = &igphy_funcs;
sc->mii_pdata = mii;
sc->mii_flags = ma->mii_flags;
diff -r a14dfeeb98d0 -r 6e691abe3ad3 sys/dev/mii/ukphy.c
--- a/sys/dev/mii/ukphy.c Fri Oct 30 03:18:10 2015 +0000
+++ b/sys/dev/mii/ukphy.c Fri Oct 30 07:35:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ukphy.c,v 1.47 2015/08/24 23:55:04 pooka Exp $ */
+/* $NetBSD: ukphy.c,v 1.48 2015/10/30 07:35:30 msaitoh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.47 2015/08/24 23:55:04 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.48 2015/10/30 07:35:30 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_mii.h"
@@ -123,6 +123,9 @@
sc->mii_dev = self;
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
+ sc->mii_mpd_oui = MII_OUI(ma->mii_id1, ma->mii_id2);
+ sc->mii_mpd_model = MII_MODEL(ma->mii_id2);
+ sc->mii_mpd_rev = MII_REV(ma->mii_id2);
sc->mii_funcs = &ukphy_funcs;
sc->mii_pdata = mii;
sc->mii_flags = ma->mii_flags;
diff -r a14dfeeb98d0 -r 6e691abe3ad3 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Fri Oct 30 03:18:10 2015 +0000
+++ b/sys/dev/pci/if_wm.c Fri Oct 30 07:35:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.375 2015/10/29 07:24:01 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.376 2015/10/30 07:35:30 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.375 2015/10/29 07:24:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.376 2015/10/30 07:35:30 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -8068,13 +8068,9 @@
struct mii_softc *child;
child = LIST_FIRST(&mii->mii_phys);
- if (device_is_a(child->mii_dev, "igphy")) {
- struct igphy_softc *isc = (struct igphy_softc *)child;
-
- model = isc->sc_mii.mii_mpd_model;
- if (model == MII_MODEL_yyINTEL_I82566)
- sc->sc_phytype = WMPHY_IGP_3;
- }
+ model = child->mii_mpd_model;
+ if (model == MII_MODEL_yyINTEL_I82566)
+ sc->sc_phytype = WMPHY_IGP_3;
ifmedia_set(&mii->mii_media, IFM_ETHER | IFM_AUTO);
}
Home |
Main Index |
Thread Index |
Old Index