axe(4) (Belkin F5D5055) problems

Pyun YongHyeon pyunyh at gmail.com
Sat Mar 28 03:29:03 PDT 2009


On Sat, Mar 28, 2009 at 11:59:13AM +0200, Niki Denev wrote:
> 2009/3/28 Pyun YongHyeon <pyunyh at gmail.com>:
> > On Fri, Mar 27, 2009 at 09:14:06PM +0200, Nikolay Denev wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> Hello,
> >>
> >> I'm running -current from 23.03.09 and I'm experiencing some axe(4)
> >> problems.
> >> Basically the network connection works but when some more serious
> >> traffic hits the
> >> interface (i.e. torrent download) it then dies, ifconfig down/up
> >> does not help, only replugging of the adapter.
> >>
> >> I've tried running with hw.usb2.axe.debug=15 and the output was many
> >> lines of:
> >>
> >> ? ?axe_bulk_write_callback:853: transfer complete
> >>
> >> then a pause of several seconds and the kernel begins to print :
> >>
> >> ? ?axe_bulk_write_callback:925: transfer error, USB_ERR_TIMEOUT
> >>
> >> Another strange thing that I noticed is that, while the interface
> >> seems to be
> >> connected and working, if I type many times ifconfig ue0 consecutively
> >> most of the time it would show different settings for the auto
> >> negotiated link.
> >> I.e. it would cycle between 100baseTX-FDX, 1000baseT-FDX, no carrier,
> >> 100BaseT-FDX hw-loopback and 1000BaseT-FDX hw-loopback.
> >>
> >> The switch does not seem to register link flaps.
> >>
> >
> > axe(4) requires exact link state/speed information from mii(4) to
> > reprogram controller to resolved speed/duplex. In this case
> > ukphy(4) seems to report fake link state/speed to axe(4).
> >
> >> The kernel messages for the interface are :
> >>
> >> ? ?ugen2.5: <Belkin Components> at usbus2
> >> ? ?axe0: <Belkin Components F5D5055, rev 2.00/0.01, addr 5> on usbus2
> >> ? ?axe0: PHYADDR 0xe0:0x01
> >> ? ?miibus0: <MII bus> on axe0
> >> ? ?ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus0
> >> ? ?ukphy0: ?10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
> >> 1000baseT, 1000baseT-FDX, auto
> >> ? ?ue0: <USB Ethernet> on axe0
> >> ? ?ue0: Ethernet address: 00:11:50:xx:xx:xx
> >>
> >> devinfo -vr | grep phy
> >> ukphy0 pnpinfo oui=0xa0bc model=0x1 rev=0x2 at phyno=1
> >>
> >
> > This looks like Agere systems ET110C TruePHY. Would you try
> > attached patch? Because truephy(4) pokes some undocumented PHY
> > registers on PHY reset I'm not sure this model also requires that
> > magic to make it work though.
> >
> 
> Hi Pyun,
> 
> Thanks for the patch.
> 
> With it the PHY is now detected as truephy.
> The only thing that i notice is that if the media status changes displayed with
> ifconfig are less frequent, and I mostly see 1000baseT-FDX and 100baseT-HDX
> The packet loss is still there, and the interface again stops to work
> after some time.
> 

Ok, revert previous patch and try attached one. This one does not
try to load ET1011C dsp codes. If this does not work next thing
would be try to load dsp code for ET1011C revision 1 model.
Not sure where I can find required dsp code.
-------------- next part --------------
Index: sys/dev/mii/truephy.c
===================================================================
--- sys/dev/mii/truephy.c	(revision 190500)
+++ sys/dev/mii/truephy.c	(working copy)
@@ -66,6 +66,11 @@
 static void	truephy_reset(struct mii_softc *);
 static void	truephy_status(struct mii_softc *);
 
+struct truephy_softc {
+	struct mii_softc mii_sc;
+	int mii_model;
+};
+
 static device_method_t truephy_methods[] = {
 	/* device interface */
 	DEVMETHOD(device_probe,		truephy_probe),
@@ -76,6 +81,7 @@
 };
 
 static const struct mii_phydesc truephys[] = {
+	MII_PHY_DESC(AGERE,	ET1011C_1),
 	MII_PHY_DESC(AGERE,	ET1011C),
 	MII_PHY_END
 };
@@ -85,7 +91,7 @@
 static driver_t truephy_driver = {
 	"truephy",
 	truephy_methods,
-	sizeof(struct mii_softc)
+	sizeof(struct truephy_softc)
 };
 
 DRIVER_MODULE(truephy, miibus, truephy_driver, truephy_devclass, 0, 0);
@@ -139,15 +145,15 @@
 truephy_attach(device_t dev)
 {
 	struct mii_softc *sc;
+	struct truephy_softc *tsc;
 	struct mii_attach_args *ma;
 	struct mii_data *mii;
 
-	sc = device_get_softc(dev);
+	tsc = device_get_softc(dev);
+	sc = &tsc->mii_sc;
 	ma = device_get_ivars(dev);
 
 	sc->mii_phy = ma->mii_phyno;
-	if (sc->mii_anegticks == 0)
-		sc->mii_anegticks = MII_ANEGTICKS;
 	sc->mii_dev = device_get_parent(dev);
 	mii = device_get_softc(sc->mii_dev);
 	LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
@@ -161,6 +167,8 @@
 
 	mii->mii_instance++;
 
+	tsc->mii_model = MII_MODEL(ma->mii_id2);
+
 	truephy_reset(sc);
 
 	sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
@@ -256,8 +264,14 @@
 static void
 truephy_reset(struct mii_softc *sc)
 {
+	struct truephy_softc *tsc;
 	int i;
 
+	tsc = (struct truephy_softc *)sc;
+	if (tsc->mii_model != MII_MODEL_AGERE_ET1011C) {
+		mii_phy_reset(sc);
+		return;
+	}
 	for (i = 0; i < 2; ++i) {
 		PHY_READ(sc, MII_PHYIDR1);
 		PHY_READ(sc, MII_PHYIDR2);
Index: sys/dev/mii/miidevs
===================================================================
--- sys/dev/mii/miidevs	(revision 190500)
+++ sys/dev/mii/miidevs	(working copy)
@@ -108,6 +108,7 @@
  */
 
 /* Agere Systems PHYs */
+model AGERE ET1011C_1		0x0001 ET1011C 10/100/1000baseT PHY
 model AGERE ET1011C		0x0004 ET1011C 10/100/1000baseT PHY
 
 /* Altima Communications PHYs */


More information about the freebsd-current mailing list