summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc/dev/if_le.c28
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);