diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-12-30 03:02:48 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-12-30 03:02:48 +0000 |
commit | 55921547e2be7ad051c2b22ed614dea6ef82e4fa (patch) | |
tree | 7dae0e64fc728e26385ad5d755d2cc8fb1377e20 | |
parent | 41dac4e706a3b57fd121df43d290332119308a4c (diff) |
If no phy is probed, proceed in 'auto' mode. This makes cards like my 10mb etherexpress pro+ combo that worked in 2.3 but not in 2.4.
-rw-r--r-- | sys/dev/pci/if_fxp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/pci/if_fxp.c b/sys/dev/pci/if_fxp.c index 38dc986e461..42e471ae40d 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.17 1998/09/22 18:58:03 deraadt Exp $ */ +/* $OpenBSD: if_fxp.c,v 1.18 1998/12/30 03:02:47 millert Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -427,11 +427,13 @@ fxp_attach(parent, self, aux) ifmedia_init(&sc->sc_mii.mii_media, 0, fxp_mediachange, fxp_mediastatus); 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_NONE, 0, NULL); - ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER|IFM_NONE); - } else - ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER|IFM_AUTO); + ifmedia_add(&sc->sc_mii.mii_media, IFM_ETHER|IFM_AUTO, 0, NULL); + printf(FXP_FORMAT ": no phy found, using auto mode\n", + FXP_ARGS(sc)); + } + ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER|IFM_AUTO); #if 0 printf(FXP_FORMAT ": %s (%s) address %s\n", FXP_ARGS(sc), |