Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Oct 2001 01:22:43 +0000
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        Jim Durham <durham@w2xo.pgh.pa.us>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: i386/31554: page fault while in kernel mode doing ifconfig of D-LINK pccard 
Message-ID:   <200110290122.aa30136@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Sun, 28 Oct 2001 17:51:13 EST." <Pine.BSF.4.21.0110281749020.16532-100000@w2xo.pgh.pa.us> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.21.0110281749020.16532-100000@w2xo.pgh.pa.us>, Jim Durha
m writes:
>
>ukphy0: OUI 0x0010dd, model 0x0001, rev. w
>uk phy0: no media present

Ok, this is strange. The "no media present" error can only occur
if the MII_BMSR register in the PHY has no media types specified,
but the generic mii code is supposed to ignore such PHYs entirely.

Something must be causing access to the PHY registers to fail
either before or after the OUI is read successfully. If possible,
could you try the following patch against an unmodified dev/ed/?
This causes the ed driver to probe the miibus but ignore it after
that, and output to the console the result of each mii register
access. Hopefully that output will provide some hints as to when
the PHY isn't responding.

Thanks,

Ian

Index: ed/if_ed.c
===================================================================
RCS file: /home/iedowse/CVS/src/sys/dev/ed/if_ed.c,v
retrieving revision 1.173.2.11
diff -u -r1.173.2.11 if_ed.c
--- ed/if_ed.c	2001/07/25 18:06:00	1.173.2.11
+++ ed/if_ed.c	2001/10/29 01:13:46
@@ -3245,6 +3245,8 @@
 	(*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS);
 
 	splx(s);
+	device_printf(dev, "phy %d reg %d val 0x%08x failed %d\n", phy, reg,
+	    val, failed);
 	return (failed ? 0 : val);
 }
 
@@ -3273,6 +3275,7 @@
 	(*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS);
 
 	splx(s);
+	device_printf(dev, "phy %d reg %d data 0x%08x\n", phy, reg, data);
 }
 
 int
Index: ed/if_ed_pccard.c
===================================================================
RCS file: /home/iedowse/CVS/src/sys/dev/ed/if_ed_pccard.c,v
retrieving revision 1.9.2.6
diff -u -r1.9.2.6 if_ed_pccard.c
--- ed/if_ed_pccard.c	2001/07/25 18:06:01	1.9.2.6
+++ ed/if_ed_pccard.c	2001/10/29 01:09:58
@@ -243,6 +243,7 @@
 		sc->mii_writebits = ed_pccard_dlink_mii_writebits;
 		mii_phy_probe(dev, &sc->miibus, ed_ifmedia_upd,
 		    ed_ifmedia_sts);
+		sc->miibus = NULL;
 	}
 
 	return (error);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <200110290122.aa30136>