10Mbps+ throughput usb based ethernet recommendation

Pyun YongHyeon pyunyh at gmail.com
Fri Mar 26 19:50:42 UTC 2010


On Thu, Mar 25, 2010 at 09:57:22PM -0300, Nenhum_de_Nos wrote:

[...]

> >> miibus1: <MII bus> on axe0
> >> ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
> >> ukphy0: XXX ID1 = 0x7949, ID2 = 0x7949
> >
> > This value looks garbage.
> 
> :(
> 
> >> ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseSX,
> >> 1000baseT, 1000baseT-FDX, auto
> >
> > And this time, ukphy(4) also thinks your PHY supports 1000baseSX.
> > Of course it's wrong because PHY is copper type.
> > By chance, are you using Belkin F5D5055 USB controller? I remember
> > another user also reported similar issue.
> 
> yes. I have two of them.
> 

Ok, would you try attached patch and check whether the patch prints
some error messages on your console? I guess some commands are
timed out here.

> thanks,
> 
> matheus
> 
> > Hans, I guess there is not much thing left to do in PHY driver
> > because accessing these MII registers return garbage. What could be
> > done in USB subsystem to get more information to know why
> > controller returns garbage for accessing MII registers?
> >
-------------- next part --------------
Index: sys/dev/usb/net/if_axe.c
===================================================================
--- sys/dev/usb/net/if_axe.c	(revision 205700)
+++ sys/dev/usb/net/if_axe.c	(working copy)
@@ -295,7 +295,7 @@
 {
 	struct axe_softc *sc = device_get_softc(dev);
 	uint16_t val;
-	int locked;
+	int error, locked;
 
 	if (sc->sc_phyno != phy)
 		return (0);
@@ -304,9 +304,15 @@
 	if (!locked)
 		AXE_LOCK(sc);
 
-	axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL);
-	axe_cmd(sc, AXE_CMD_MII_READ_REG, reg, phy, &val);
-	axe_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL);
+	error = axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL);
+	if (error != 0)
+		printf("AXE_CMD_MII_OPMODE_SW failed : %d:%d\n", reg, error);
+	error = axe_cmd(sc, AXE_CMD_MII_READ_REG, reg, phy, &val);
+	if (error != 0)
+		printf("AXE_CMD_MII_READ_REG failed : %d:%d\n", reg, error);	
+	error = axe_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL);
+	if (error != 0)
+		printf("AXE_CMD_MII_OPMODE_HW failed : %d:%d\n", reg, error);	
 
 	val = le16toh(val);
 	if ((sc->sc_flags & AXE_FLAG_772) != 0 && reg == MII_BMSR) {


More information about the freebsd-usb mailing list