diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-08-26 05:30:33 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-08-26 05:30:33 +0000 |
commit | 770a5a6eaec575998d97a2255f606b3f2a0048d9 (patch) | |
tree | 8da2fac722f8d0c1b64cb54619834401db3d6008 /sys/dev | |
parent | 1bfa323b0692d6459b922f43b79da97dbb8cb700 (diff) | |
download | FreeBSD-src-770a5a6eaec575998d97a2255f606b3f2a0048d9.zip FreeBSD-src-770a5a6eaec575998d97a2255f606b3f2a0048d9.tar.gz |
Handle buses with multiple PHYs correctly.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/mii/mii.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c index 1673acf..833c3a2 100644 --- a/sys/dev/mii/mii.c +++ b/sys/dev/mii/mii.c @@ -60,7 +60,7 @@ #if !defined(lint) static const char rcsid[] = - "$Id$"; + "$Id: mii.c,v 1.1 1999/08/21 17:40:41 wpaul Exp $"; #endif static int miibus_readreg __P((device_t, int, int)); @@ -106,7 +106,7 @@ int miibus_probe(dev) { struct mii_attach_args ma, *args; struct mii_data *mii; - device_t child, parent; + device_t child = 0, parent; int bmsr, capmask = 0xFFFFFFFF; mii = device_get_softc(dev); @@ -143,11 +143,9 @@ int miibus_probe(dev) M_DEVBUF, M_NOWAIT); bcopy((char *)&ma, (char *)args, sizeof(ma)); child = device_add_child(dev, NULL, -1, args); - - break; } - if (ma.mii_phyno == MII_NPHY) + if (child == NULL) return(ENXIO); device_set_desc(dev, "MII bus"); |