summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2000-01-09 22:36:47 +0000
committerJason Wright <jason@cvs.openbsd.org>2000-01-09 22:36:47 +0000
commitea0a9c84da2ca449abf6721768acc2c92bc64700 (patch)
treedeb748eba24427aa1d7fd25147b72d6e60c7acfa
parent479c7f20fc59cd64f3fd7fd0c7f1bb74d3c4db78 (diff)
If no phy found, add IFM_MANUAL and then use it. This is more accurate
than adding IFM_AUTO. Also modify checks for which media are available to try: IFM_MANUAL first, IFM_AUTO next, and finally IFM_10_T.
-rw-r--r--sys/dev/pci/if_fxp.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/pci/if_fxp.c b/sys/dev/pci/if_fxp.c
index 12882c12b1c..b59b72918c5 100644
--- a/sys/dev/pci/if_fxp.c
+++ b/sys/dev/pci/if_fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fxp.c,v 1.23 2000/01/08 05:54:44 jason Exp $ */
+/* $OpenBSD: if_fxp.c,v 1.24 2000/01/09 22:36:46 jason Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -428,12 +428,15 @@ fxp_attach(parent, self, aux)
mii_phy_probe(self, &sc->sc_mii, 0xffffffff);
/* If no phy found, just use auto mode */
if (LIST_FIRST(&sc->sc_mii.mii_phys) == NULL) {
- ifmedia_add(&sc->sc_mii.mii_media, IFM_ETHER|IFM_AUTO, 0, NULL);
- printf(FXP_FORMAT ": no phy found, using auto mode\n",
+ ifmedia_add(&sc->sc_mii.mii_media, IFM_ETHER|IFM_MANUAL,
+ 0, NULL);
+ printf(FXP_FORMAT ": no phy found, using manual mode\n",
FXP_ARGS(sc));
}
- if (ifmedia_match(&sc->sc_mii.mii_media, IFM_ETHER|IFM_AUTO, 0))
+ if (ifmedia_match(&sc->sc_mii.mii_media, IFM_ETHER|IFM_MANUAL, 0))
+ ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER|IFM_MANUAL);
+ else if (ifmedia_match(&sc->sc_mii.mii_media, IFM_ETHER|IFM_AUTO, 0))
ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER|IFM_AUTO);
else
ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER|IFM_10_T);