igphy(4),ukphy(4): Set mii_mpd_* entries.
wm(4): check PHY type correctly.
This commit is contained in:
parent
862d86e79e
commit
d44325eed8
@ -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 @@ igphyattach(device_t parent, device_t self, void *aux)
|
||||
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;
|
||||
|
@ -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 @@ ukphyattach(device_t parent, device_t self, void *aux)
|
||||
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;
|
||||
|
@ -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 @@ wm_gmii_mediainit(struct wm_softc *sc, pci_product_id_t prodid)
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user