Use aprint*().

This commit is contained in:
thorpej 2003-04-29 01:49:33 +00:00
parent b43b1645a2
commit c31f87a5cb
25 changed files with 190 additions and 163 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: md_root.c,v 1.9 2003/03/07 01:26:12 thorpej Exp $ */
/* $NetBSD: md_root.c,v 1.10 2003/04/29 01:52:59 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.9 2003/03/07 01:26:12 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.10 2003/04/29 01:52:59 thorpej Exp $");
#include "opt_md.h"
@ -109,7 +109,7 @@ md_attach_hook(int unit, struct md_conf *md)
md->md_size = (size_t)md_root_size;
md->md_type = MD_KMEM_FIXED;
format_bytes(pbuf, sizeof(pbuf), md->md_size);
printf("md%d: internal %s image area\n", unit, pbuf);
aprint_normal("md%d: internal %s image area\n", unit, pbuf);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: acphy.c,v 1.12 2003/01/26 06:25:08 matt Exp $ */
/* $NetBSD: acphy.c,v 1.13 2003/04/29 01:49:33 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.12 2003/01/26 06:25:08 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.13 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -109,7 +109,8 @@ acphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, acphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -126,24 +127,24 @@ acphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
if (sc->mii_flags & MIIF_HAVEFIBER) {
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst),
MII_MEDIA_100_TX);
printf("100baseFX, ");
aprint_normal("100baseFX, ");
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst),
MII_MEDIA_100_TX);
printf("100baseFX-FDX, ");
aprint_normal("100baseFX-FDX, ");
}
#undef ADD
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: amhphy.c,v 1.8 2002/10/02 16:34:14 thorpej Exp $ */
/* $NetBSD: amhphy.c,v 1.9 2003/04/29 01:49:33 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: amhphy.c,v 1.8 2002/10/02 16:34:14 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: amhphy.c,v 1.9 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -99,7 +99,8 @@ amhphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, amhphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -112,12 +113,12 @@ amhphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: bmtphy.c,v 1.11 2002/10/02 16:34:15 thorpej Exp $ */
/* $NetBSD: bmtphy.c,v 1.12 2003/04/29 01:49:33 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bmtphy.c,v 1.11 2002/10/02 16:34:15 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: bmtphy.c,v 1.12 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -138,7 +138,8 @@ bmtphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, bmtphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -155,12 +156,12 @@ bmtphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: brgphy.c,v 1.16 2003/01/16 20:02:05 jonathan Exp $ */
/* $NetBSD: brgphy.c,v 1.17 2003/04/29 01:49:33 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.16 2003/01/16 20:02:05 jonathan Exp $");
__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.17 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -178,7 +178,8 @@ brgphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, brgphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -189,13 +190,14 @@ brgphyattach(struct device *parent, struct device *self, void *aux)
switch (MII_MODEL(ma->mii_id2)) {
case MII_MODEL_BROADCOM_BCM5400:
sc->mii_funcs = &brgphy_5401_funcs;
printf("%s: using BCM5401 DSP patch\n", sc->mii_dev.dv_xname);
aprint_normal("%s: using BCM5401 DSP patch\n",
sc->mii_dev.dv_xname);
break;
case MII_MODEL_BROADCOM_BCM5401:
if (MII_REV(ma->mii_id2) == 1 || MII_REV(ma->mii_id2) == 3) {
sc->mii_funcs = &brgphy_5401_funcs;
printf("%s: using BCM5401 DSP patch\n",
aprint_normal("%s: using BCM5401 DSP patch\n",
sc->mii_dev.dv_xname);
} else
sc->mii_funcs = &brgphy_funcs;
@ -203,19 +205,22 @@ brgphyattach(struct device *parent, struct device *self, void *aux)
case MII_MODEL_BROADCOM_BCM5411:
sc->mii_funcs = &brgphy_5411_funcs;
printf("%s: using BCM5411 DSP patch\n", sc->mii_dev.dv_xname);
aprint_normal("%s: using BCM5411 DSP patch\n",
sc->mii_dev.dv_xname);
break;
#ifdef notyet /* unverified, untested */
case MII_MODEL_BROADCOM_BCM5703:
sc->mii_funcs = &brgphy_5703_funcs;
printf("%s: using BCM5703 DSP patch\n", sc->mii_dev.dv_xname);
aprint_normal("%s: using BCM5703 DSP patch\n",
sc->mii_dev.dv_xname);
break;
#endif
case MII_MODEL_BROADCOM_BCM5704:
sc->mii_funcs = &brgphy_5704_funcs;
printf("%s: using BCM5704 DSP patch\n", sc->mii_dev.dv_xname);
aprint_normal("%s: using BCM5704 DSP patch\n",
sc->mii_dev.dv_xname);
break;
default:
@ -230,13 +235,13 @@ brgphyattach(struct device *parent, struct device *self, void *aux)
if (sc->mii_capabilities & BMSR_EXTSTAT)
sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 &&
(sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: dmphy.c,v 1.17 2002/10/02 16:34:15 thorpej Exp $ */
/* $NetBSD: dmphy.c,v 1.18 2003/04/29 01:49:33 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dmphy.c,v 1.17 2002/10/02 16:34:15 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: dmphy.c,v 1.18 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -134,7 +134,8 @@ dmphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, dmphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -147,12 +148,12 @@ dmphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: exphy.c,v 1.34 2002/10/02 16:34:16 thorpej Exp $ */
/* $NetBSD: exphy.c,v 1.35 2003/04/29 01:49:33 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: exphy.c,v 1.34 2002/10/02 16:34:16 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: exphy.c,v 1.35 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -127,7 +127,8 @@ exphyattach(struct device *parent, struct device *self, void *aux)
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
printf(": 3Com internal media interface\n");
aprint_naive(": Media interface\n");
aprint_normal(": 3Com internal media interface\n");
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -141,7 +142,7 @@ exphyattach(struct device *parent, struct device *self, void *aux)
* instances!
*/
if (mii->mii_instance != 0) {
printf("%s: ignoring this PHY, non-zero instance\n",
aprint_error("%s: ignoring this PHY, non-zero instance\n",
sc->mii_dev.dv_xname);
return;
}
@ -151,12 +152,12 @@ exphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: gentbi.c,v 1.9 2002/10/02 16:34:16 thorpej Exp $ */
/* $NetBSD: gentbi.c,v 1.10 2003/04/29 01:49:33 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gentbi.c,v 1.9 2002/10/02 16:34:16 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: gentbi.c,v 1.10 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -143,7 +143,8 @@ gentbiattach(struct device *parent, struct device *self, void *aux)
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
printf(": Generic ten-bit interface, rev. %d\n",
aprint_naive(": Media interface\n");
aprint_normal(": Generic ten-bit interface, rev. %d\n",
MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
@ -164,13 +165,13 @@ gentbiattach(struct device *parent, struct device *self, void *aux)
if (sc->mii_capabilities & BMSR_EXTSTAT)
sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 &&
(sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: glxtphy.c,v 1.8 2002/10/02 16:34:17 thorpej Exp $ */
/* $NetBSD: glxtphy.c,v 1.9 2003/04/29 01:49:33 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: glxtphy.c,v 1.8 2002/10/02 16:34:17 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: glxtphy.c,v 1.9 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -133,7 +133,8 @@ glxtphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, glxtphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -149,13 +150,13 @@ glxtphyattach(struct device *parent, struct device *self, void *aux)
if (sc->mii_capabilities & BMSR_EXTSTAT)
sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 &&
(sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: gphyter.c,v 1.11 2002/10/02 16:34:17 thorpej Exp $ */
/* $NetBSD: gphyter.c,v 1.12 2003/04/29 01:49:33 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gphyter.c,v 1.11 2002/10/02 16:34:17 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: gphyter.c,v 1.12 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -138,7 +138,8 @@ gphyterattach(struct device *parent, struct device *self, void *aux)
int anar, strap;
mpd = mii_phy_match(ma, gphyters);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -167,20 +168,20 @@ gphyterattach(struct device *parent, struct device *self, void *aux)
if (anar & ANAR_10_FD)
sc->mii_capabilities |= (BMSR_10TFDX & ma->mii_capmask);
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 &&
(sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
strap = PHY_READ(sc, MII_GPHYTER_STRAP);
printf("%s: strapped to %s mode", sc->mii_dev.dv_xname,
aprint_normal("%s: strapped to %s mode", sc->mii_dev.dv_xname,
(strap & STRAP_MS_VAL) ? "master" : "slave");
if (strap & STRAP_NC_MODE)
printf(", pre-C5 BCM5400 compat enabled");
printf("\n");
aprint_normal(", pre-C5 BCM5400 compat enabled");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: icsphy.c,v 1.30 2002/10/02 16:34:17 thorpej Exp $ */
/* $NetBSD: icsphy.c,v 1.31 2003/04/29 01:49:33 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: icsphy.c,v 1.30 2002/10/02 16:34:17 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: icsphy.c,v 1.31 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -134,7 +134,8 @@ icsphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, icsphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -147,12 +148,12 @@ icsphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: inphy.c,v 1.34 2003/03/27 19:36:49 drochner Exp $ */
/* $NetBSD: inphy.c,v 1.35 2003/04/29 01:49:33 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: inphy.c,v 1.34 2003/03/27 19:36:49 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: inphy.c,v 1.35 2003/04/29 01:49:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -140,7 +140,8 @@ inphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, inphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -153,12 +154,12 @@ inphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: iophy.c,v 1.20 2002/10/02 16:34:18 thorpej Exp $ */
/* $NetBSD: iophy.c,v 1.21 2003/04/29 01:49:34 thorpej Exp $ */
/*
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: iophy.c,v 1.20 2002/10/02 16:34:18 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: iophy.c,v 1.21 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -132,7 +132,8 @@ iophyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, iophys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -145,12 +146,12 @@ iophyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: lxtphy.c,v 1.32 2002/10/02 16:34:18 thorpej Exp $ */
/* $NetBSD: lxtphy.c,v 1.33 2003/04/29 01:49:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lxtphy.c,v 1.32 2002/10/02 16:34:18 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: lxtphy.c,v 1.33 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -142,7 +142,8 @@ lxtphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, lxtphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -158,24 +159,24 @@ lxtphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if (sc->mii_flags & MIIF_HAVEFIBER) {
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst),
MII_MEDIA_100_TX);
printf("100baseFX, ");
aprint_normal("100baseFX, ");
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, IFM_FDX, sc->mii_inst),
MII_MEDIA_100_TX_FDX);
printf("100baseFX-FDX, ");
aprint_normal("100baseFX-FDX, ");
#undef ADD
}
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: makphy.c,v 1.11 2002/10/02 16:34:19 thorpej Exp $ */
/* $NetBSD: makphy.c,v 1.12 2003/04/29 01:49:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.11 2002/10/02 16:34:19 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.12 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -136,7 +136,8 @@ makphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, makphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -152,13 +153,13 @@ makphyattach(struct device *parent, struct device *self, void *aux)
if (sc->mii_capabilities & BMSR_EXTSTAT)
sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 &&
(sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: mii_physubr.c,v 1.35 2003/02/20 00:55:21 matt Exp $ */
/* $NetBSD: mii_physubr.c,v 1.36 2003/04/29 01:49:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.35 2003/02/20 00:55:21 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.36 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -408,7 +408,7 @@ mii_phy_add_media(struct mii_softc *sc)
const char *sep = "";
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
#define PRINT(n) printf("%s%s", sep, (n)); sep = ", "
#define PRINT(n) aprint_normal("%s%s", sep, (n)); sep = ", "
if ((sc->mii_flags & MIIF_NOISOLATE) == 0)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst),

View File

@ -1,4 +1,4 @@
/* $NetBSD: nsphy.c,v 1.38 2002/10/02 16:34:19 thorpej Exp $ */
/* $NetBSD: nsphy.c,v 1.39 2003/04/29 01:49:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nsphy.c,v 1.38 2002/10/02 16:34:19 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: nsphy.c,v 1.39 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -131,7 +131,8 @@ nsphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, nsphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -144,12 +145,12 @@ nsphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: nsphyter.c,v 1.18 2002/10/02 16:34:20 thorpej Exp $ */
/* $NetBSD: nsphyter.c,v 1.19 2003/04/29 01:49:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v 1.18 2002/10/02 16:34:20 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v 1.19 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -137,7 +137,8 @@ nsphyterattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, nsphyters);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -150,12 +151,12 @@ nsphyterattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: pnaphy.c,v 1.9 2002/10/13 06:28:01 fair Exp $ */
/* $NetBSD: pnaphy.c,v 1.10 2003/04/29 01:49:34 thorpej Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pnaphy.c,v 1.9 2002/10/13 06:28:01 fair Exp $");
__KERNEL_RCSID(0, "$NetBSD: pnaphy.c,v 1.10 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -109,7 +109,8 @@ pnaphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, pnaphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -122,12 +123,12 @@ pnaphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: qsphy.c,v 1.31 2002/10/02 16:34:20 thorpej Exp $ */
/* $NetBSD: qsphy.c,v 1.32 2003/04/29 01:49:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: qsphy.c,v 1.31 2002/10/02 16:34:20 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: qsphy.c,v 1.32 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -131,7 +131,8 @@ qsphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, qsphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -144,12 +145,12 @@ qsphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: sqphy.c,v 1.33 2002/10/02 16:34:21 thorpej Exp $ */
/* $NetBSD: sqphy.c,v 1.34 2003/04/29 01:49:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sqphy.c,v 1.33 2002/10/02 16:34:21 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sqphy.c,v 1.34 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -142,7 +142,8 @@ sqphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, sqphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -153,7 +154,7 @@ sqphyattach(struct device *parent, struct device *self, void *aux)
switch (MII_MODEL(ma->mii_id2)) {
case MII_MODEL_SEEQ_84220:
sc->mii_funcs = &sqphy_84220_funcs;
printf("%s: using Seeq 84220 isolate/reset hack\n",
aprint_normal("%s: using Seeq 84220 isolate/reset hack\n",
sc->mii_dev.dv_xname);
break;
@ -165,12 +166,12 @@ sqphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: tlphy.c,v 1.38 2002/10/23 01:50:11 perry Exp $ */
/* $NetBSD: tlphy.c,v 1.39 2003/04/29 01:49:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tlphy.c,v 1.38 2002/10/23 01:50:11 perry Exp $");
__KERNEL_RCSID(0, "$NetBSD: tlphy.c,v 1.39 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -150,7 +150,8 @@ tlphyattach(struct device *parent, struct device *self, void *aux)
const char *sep = "";
mpd = mii_phy_match(ma, tlphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->sc_mii.mii_inst = mii->mii_instance;
sc->sc_mii.mii_phy = ma->mii_phyno;
@ -177,9 +178,9 @@ tlphyattach(struct device *parent, struct device *self, void *aux)
#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL)
#define PRINT(str) printf("%s%s", sep, str); sep = ", "
#define PRINT(str) aprint_normal("%s%s", sep, str); sep = ", "
printf("%s: ", sc->sc_mii.mii_dev.dv_xname);
aprint_normal("%s: ", sc->sc_mii.mii_dev.dv_xname);
if (sc->sc_tlphycap) {
if (sc->sc_tlphycap & TLPHY_MEDIA_10_2) {
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_2, 0,
@ -192,12 +193,12 @@ tlphyattach(struct device *parent, struct device *self, void *aux)
}
}
if (sc->sc_mii.mii_capabilities & BMSR_MEDIAMASK) {
printf("%s", sep);
aprint_normal("%s", sep);
mii_phy_add_media(&sc->sc_mii);
} else if ((sc->sc_tlphycap &
(TLPHY_MEDIA_10_2 | TLPHY_MEDIA_10_5)) == 0)
printf("no media present");
printf("\n");
aprint_error("no media present");
aprint_normal("\n");
#undef ADD
#undef PRINT
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: tqphy.c,v 1.22 2002/10/02 16:34:22 thorpej Exp $ */
/* $NetBSD: tqphy.c,v 1.23 2003/04/29 01:49:34 thorpej Exp $ */
/*
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tqphy.c,v 1.22 2002/10/02 16:34:22 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: tqphy.c,v 1.23 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -139,7 +139,8 @@ tqphyattach(struct device *parent, struct device *self, void *aux)
const struct mii_phydesc *mpd;
mpd = mii_phy_match(ma, tqphys);
printf(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
aprint_naive(": Media interface\n");
aprint_normal(": %s, rev. %d\n", mpd->mpd_name, MII_REV(ma->mii_id2));
sc->mii_inst = mii->mii_instance;
sc->mii_phy = ma->mii_phyno;
@ -157,12 +158,12 @@ tqphyattach(struct device *parent, struct device *self, void *aux)
sc->mii_capabilities =
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: ukphy.c,v 1.22 2002/10/02 16:34:22 thorpej Exp $ */
/* $NetBSD: ukphy.c,v 1.23 2003/04/29 01:49:34 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.22 2002/10/02 16:34:22 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ukphy.c,v 1.23 2003/04/29 01:49:34 thorpej Exp $");
#include "opt_mii.h"
@ -133,19 +133,20 @@ ukphyattach(struct device *parent, struct device *self, void *aux)
int i;
#endif
printf(": Generic IEEE 802.3u media interface\n");
aprint_naive(": Media interface\n");
aprint_normal(": Generic IEEE 802.3u media interface\n");
#ifdef MIIVERBOSE
for (i = 0; mii_knowndevs[i].descr != NULL; i++)
if (mii_knowndevs[i].oui == oui &&
mii_knowndevs[i].model == model)
break;
if (mii_knowndevs[i].descr != NULL)
printf("%s: %s (OUI 0x%06x, model 0x%04x), rev. %d\n",
aprint_normal("%s: %s (OUI 0x%06x, model 0x%04x), rev. %d\n",
sc->mii_dev.dv_xname, mii_knowndevs[i].descr,
oui, model, rev);
else
#endif
printf("%s: OUI 0x%06x, model 0x%04x, rev. %d\n",
aprint_normal("%s: OUI 0x%06x, model 0x%04x, rev. %d\n",
sc->mii_dev.dv_xname, oui, model, rev);
sc->mii_inst = mii->mii_instance;
@ -166,13 +167,13 @@ ukphyattach(struct device *parent, struct device *self, void *aux)
PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
if (sc->mii_capabilities & BMSR_EXTSTAT)
sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR);
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 &&
(sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: urlphy.c,v 1.7 2003/04/04 22:21:39 kristerw Exp $ */
/* $NetBSD: urlphy.c,v 1.8 2003/04/29 01:49:34 thorpej Exp $ */
/*
* Copyright (c) 2001, 2002
* Shingo WATANABE <nabe@nabechan.org>. All rights reserved.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.7 2003/04/04 22:21:39 kristerw Exp $");
__KERNEL_RCSID(0, "$NetBSD: urlphy.c,v 1.8 2003/04/29 01:49:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -103,7 +103,8 @@ urlphy_attach(struct device *parent, struct device *self, void *aux)
struct mii_attach_args *ma = aux;
struct mii_data *mii = ma->mii_data;
printf(": Realtek RTL8150L internal media interface\n");
aprint_naive(": Media interface\n");
aprint_normal(": Realtek RTL8150L internal media interface\n");
DPRINTF(("%s: %s: enter\n", sc->mii_dev.dv_xname, __FUNCTION__));
@ -120,19 +121,19 @@ urlphy_attach(struct device *parent, struct device *self, void *aux)
sc->mii_flags |= MIIF_NOISOLATE;
if (mii->mii_instance != 0) {
printf("%s: ignoring this PHY, non-zero instance\n",
aprint_error("%s: ignoring this PHY, non-zero instance\n",
sc->mii_dev.dv_xname);
return;
}
PHY_RESET(sc);
sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
printf("%s: ", sc->mii_dev.dv_xname);
aprint_normal("%s: ", sc->mii_dev.dv_xname);
if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0)
printf("no media present");
aprint_error("no media present");
else
mii_phy_add_media(sc);
printf("\n");
aprint_normal("\n");
}
int