diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-05-14 23:35:32 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-05-14 23:35:32 +0000 |
commit | affc92e2d4ec8eec31b765e6db362cd263180fa7 (patch) | |
tree | 46ece1ff47348adfcba9b75de53cac9a7ca3f3ff /sys/arch | |
parent | 1e711385f7a9a43b729d1874f74fcdcb5a50787d (diff) |
Silence the "lost carrier on FOO port" messages when the port has been set
in stone with "ifconfig le0 media foo". Inspired by previous am7990.c change.
ok todd@ jason@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/dev/if_le.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/sys/arch/sparc/dev/if_le.c b/sys/arch/sparc/dev/if_le.c index 0ac2c8e093c..418d160d1f3 100644 --- a/sys/arch/sparc/dev/if_le.c +++ b/sys/arch/sparc/dev/if_le.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_le.c,v 1.20 2002/04/30 01:12:29 art Exp $ */ +/* $OpenBSD: if_le.c,v 1.21 2003/05/14 23:35:30 miod Exp $ */ /* $NetBSD: if_le.c,v 1.50 1997/09/09 20:54:48 pk Exp $ */ /*- @@ -347,41 +347,40 @@ lehwinit(sc) #endif } +#if defined(SUN4M) hide void lenocarrier(sc) struct am7990_softc *sc; { -#if defined(SUN4M) struct le_softc *lesc = (struct le_softc *)sc; - if (CPU_ISSUN4M && lesc->sc_dma) { + if (lesc->sc_dma) { /* * Check if the user has requested a certain cable type, and * if so, honor that request. */ - printf("%s: lost carrier on ", sc->sc_dev.dv_xname); if (lesc->sc_dma->sc_regs->csr & DE_AUI_TP) { - printf("UTP port"); switch (IFM_SUBTYPE(sc->sc_ifmedia.ifm_media)) { case IFM_10_5: case IFM_AUTO: - printf(", switching to AUI port"); + printf("%s: lost carrier on UTP port" + ", switching to AUI port\n", + sc->sc_dev.dv_xname); lesetaui(sc); } } else { - printf("AUI port"); switch (IFM_SUBTYPE(sc->sc_ifmedia.ifm_media)) { case IFM_10_T: case IFM_AUTO: - printf(", switching to UTP port"); + printf("%s: lost carrier on AUI port" + ", switching to UTP port\n", + sc->sc_dev.dv_xname); lesetutp(sc); } } - printf("\n"); - } else -#endif - printf("%s: lost carrier\n", sc->sc_dev.dv_xname); + } } +#endif int lematch(parent, vcf, aux) @@ -542,7 +541,10 @@ leattach(parent, self, aux) sc->sc_rdcsr = lerdcsr; sc->sc_wrcsr = lewrcsr; sc->sc_hwinit = lehwinit; - sc->sc_nocarrier = lenocarrier; +#if defined(SUN4M) + if (CPU_ISSUN4M) + sc->sc_nocarrier = lenocarrier; +#endif sc->sc_hwreset = lehwreset; ifmedia_init(&sc->sc_ifmedia, 0, lemediachange, lemediastatus); |