aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mii
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2008-08-23 07:46:20 +0000
committerWarner Losh <imp@FreeBSD.org>2008-08-23 07:46:20 +0000
commite1bd4ee68bc667a644dfc84046c117a8bcc4d4ab (patch)
tree42cdecf1532cbada31a0f2a92f29bf693feb1c40 /sys/dev/mii
parent83bda63e3ef5f9a786351590a521c49b0f0f9558 (diff)
Notes
Diffstat (limited to 'sys/dev/mii')
-rw-r--r--sys/dev/mii/mii.c1
-rw-r--r--sys/dev/mii/mlphy.c2
-rw-r--r--sys/dev/mii/tlphy.c1
3 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/mii/mii.c b/sys/dev/mii/mii.c
index 065bc5de4f183..11610e9eea7a6 100644
--- a/sys/dev/mii/mii.c
+++ b/sys/dev/mii/mii.c
@@ -339,6 +339,7 @@ mii_phy_probe(device_t dev, device_t *child, ifm_change_cb_t ifmedia_upd,
for (i = 0; i < MII_NPHY; i++) {
bmsr = MIIBUS_READREG(dev, i, MII_BMSR);
+ printf("BMSR(%d) is %#x\n", i, bmsr);
if (bmsr == 0 || bmsr == 0xffff ||
(bmsr & (BMSR_EXTSTAT|BMSR_MEDIAMASK)) == 0) {
/* Assume no PHY at this address. */
diff --git a/sys/dev/mii/mlphy.c b/sys/dev/mii/mlphy.c
index d0a549cc67548..9eba9da899e05 100644
--- a/sys/dev/mii/mlphy.c
+++ b/sys/dev/mii/mlphy.c
@@ -194,6 +194,7 @@ mlphy_service(xsc, mii, cmd)
* See if there's another PHY on this bus with us.
* If so, we may need it for 10Mbps modes.
*/
+ devs = 0;
device_get_children(msc->ml_mii.mii_dev, &devlist, &devs);
for (i = 0; i < devs; i++) {
if (strcmp(device_get_name(devlist[i]), "mlphy")) {
@@ -400,6 +401,7 @@ mlphy_status(sc)
int devs, i;
/* See if there's another PHY on the bus with us. */
+ devs = 0;
device_get_children(msc->ml_mii.mii_dev, &devlist, &devs);
for (i = 0; i < devs; i++) {
if (strcmp(device_get_name(devlist[i]), "mlphy")) {
diff --git a/sys/dev/mii/tlphy.c b/sys/dev/mii/tlphy.c
index d21fe7f910e03..6a603c2995622 100644
--- a/sys/dev/mii/tlphy.c
+++ b/sys/dev/mii/tlphy.c
@@ -163,6 +163,7 @@ tlphy_attach(device_t dev)
capmask = 0xFFFFFFFF;
if (mii->mii_instance) {
+ devs = 0;
device_get_children(sc->sc_mii.mii_dev, &devlist, &devs);
for (i = 0; i < devs; i++) {
if (strcmp(device_get_name(devlist[i]), "tlphy")) {