Date: Fri, 26 Mar 2010 12:50:12 -0700 From: Pyun YongHyeon <pyunyh@gmail.com> To: Nenhum_de_Nos <matheus@eternamente.info> Cc: freebsd-usb@freebsd.org Subject: Re: 10Mbps+ throughput usb based ethernet recommendation Message-ID: <20100326195012.GS1278@michelle.cdnetworks.com> In-Reply-To: <e15b32df866e9001a9f0971b2393bce2.squirrel@cygnus.homeunix.com> References: <20100324010107.GM1278@michelle.cdnetworks.com> <3e164e2fc77415a67bd7d22e9c51168b.squirrel@cygnus.homeunix.com> <20100324214230.GT1278@michelle.cdnetworks.com> <20100324215827.GU1278@michelle.cdnetworks.com> <20100324231833.GX1278@michelle.cdnetworks.com> <35a626b67a1556071f4c76498214581d.squirrel@cygnus.homeunix.com> <20100325173556.GA1278@michelle.cdnetworks.com> <b5b7224dd079150dcb9c932ef6603e08.squirrel@cygnus.homeunix.com> <20100326003150.GI1278@michelle.cdnetworks.com> <e15b32df866e9001a9f0971b2393bce2.squirrel@cygnus.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--2xzXx3ruJf7hsAzo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? > > --2xzXx3ruJf7hsAzo Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="axe.belkin.patch2" 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) { --2xzXx3ruJf7hsAzo--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100326195012.GS1278>