From owner-freebsd-usb@FreeBSD.ORG Tue Apr 13 00:53:00 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96C951065670 for ; Tue, 13 Apr 2010 00:53:00 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.221.175]) by mx1.freebsd.org (Postfix) with ESMTP id 45F7B8FC0A for ; Tue, 13 Apr 2010 00:52:59 +0000 (UTC) Received: by qyk5 with SMTP id 5so7137059qyk.3 for ; Mon, 12 Apr 2010 17:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=hXKoFUek+rxMs3I03A8KNW1nZ0URo5ZczXQ+98d4CSU=; b=FWF5HgrpZfFPcqhngboMPNj11C9xPE7TI3rloY2IremPjTQoaG7s/Z/dmr8T89C5xX v6FzHgJfxb5YHP810AmvgEL8gFf6R/yYZ/hJWvfRgz02VUbkHywQrQVCXMfRTb/F1a0+ /nWFd5FPMh06BH9eXuOGFm781YtmvDtPJyjX4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=LJ4WQ+nVNChDKrxronXq3oFf7QJaxhJEBosq2L7qUNFiZMhnIe6TQr1szmf0nylcXD OVUdUjj0DJuYSv5dwBcjTAnzvaI8CnBRo5y1fciqv7eVK6uiqT9gHPmD6WkKGCDJykcL MqA/irH/zSDjblH2wzLpE18NNDm10WeFctcW4= Received: by 10.229.212.9 with SMTP id gq9mr4779802qcb.84.1271119979520; Mon, 12 Apr 2010 17:52:59 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id v37sm6803819qce.12.2010.04.12.17.52.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Apr 2010 17:52:55 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 12 Apr 2010 17:52:55 -0700 From: Pyun YongHyeon Date: Mon, 12 Apr 2010 17:52:55 -0700 To: Nenhum_de_Nos Message-ID: <20100413005255.GJ1444@michelle.cdnetworks.com> References: <20100326003150.GI1278@michelle.cdnetworks.com> <20100326195012.GS1278@michelle.cdnetworks.com> <6672a5444e755931f93f58f7b2df28c4.squirrel@cygnus.homeunix.com> <20100327021954.GY1278@michelle.cdnetworks.com> <4f4516c4a748aacfbd62cad9691afb90.squirrel@cygnus.homeunix.com> <20100331190631.GQ1473@michelle.cdnetworks.com> <20100403214659.fb4a19ea.matheus@eternamente.info> <20100405011256.GC1225@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100405011256.GC1225@michelle.cdnetworks.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-usb@freebsd.org Subject: Re: 10Mbps+ throughput usb based ethernet recommendation X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 00:53:00 -0000 On Sun, Apr 04, 2010 at 06:12:56PM -0700, Pyun YongHyeon wrote: > On Sat, Apr 03, 2010 at 09:46:59PM -0300, Nenhum_de_Nos wrote: > > On Wed, 31 Mar 2010 12:06:31 -0700 > > Pyun YongHyeon wrote: > > > > > On Fri, Mar 26, 2010 at 11:31:50PM -0300, Nenhum_de_Nos wrote: > > > > > > [...] > > > > > > > >> I changed and got this: > > > > >> > > > > >> miibus1: on axe0 > > > > >> ukphy0: PHY 1 on miibus1 > > > > >> ukphy0: XXX ID1 = 0x0282, ID2 = 0xf012 > > > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > > > > > > > > > This is *NOT* bogus value. It's Agere Systems' ET1011 gigabit PHY. > > > > > FreeBSD has truephy(4) for Agere Systems' PHY but it does not have > > > > > support code for the model yet. > > > > > > > > so I can think that's the issue, right ? > > > > > > Probably. But this does not explain sometimes why you get some > > > bogus value form PHY id registers. > > > > > > > > >> ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, > > > > >> 1000baseT-FDX, auto > > > > >> ue0: on axe0 > > > > >> ue0: Ethernet address: xxxxxxxxxxxxxx > > > > >> ue0: link state changed to DOWN > > > > >> > > > > >> so it didn't now. other thing is that not every time it works: > > > > >> > > > > > > > > > > Yeah, that is real issue here. I guess there should be some magic > > > > > to wakeup the PHY from deep sleep state. I'll see what can be done. > > > > > > > > ok, great it was found :) > > > > > > > > let me know if I can help in anything :) > > > > > > > > > > Would you try attached patch and let me know how it goes? > > > > axe0: PHYADDR 0xe0:0x01 > > miibus1: on axe0 > > ukphy0: PHY 1 on miibus1 > > ukphy0: XXX ID1 = 0x7949, ID2 = 0x7949 > > Due to other issues previous patch didn't have chance to make it > work. This time, PHY id started to reporting garbage again which > means all MII register access may return garbage too. Don't know > this could be related with USB subsystem though. > > > ukphy0: 10baseT-FDX > > ue0: on axe0 > > ue0: Ethernet address: 00:11:50:e7:39:e9 > > ue0: link state changed to DOWN > > [...] > > > and I can't ping the other host :( > > > > ue0: flags=8843 metric 0 mtu 1500 > > options=80000 > > ether 00:11:50:e7:39:e9 > > inet 10.2.1.2 netmask 0xffffff00 broadcast 10.2.1.255 > > media: Ethernet none > > arroway# ifconfig ue0 > > ue0: flags=8843 metric 0 mtu 1500 > > options=80000 > > ether 00:11:50:e7:39:e9 > > inet 10.2.1.2 netmask 0xffffff00 broadcast 10.2.1.255 > > media: Ethernet none (none ) > > status: active > > arroway# ifconfig ue0 > > ue0: flags=8843 metric 0 mtu 1500 > > options=80000 > > ether 00:11:50:e7:39:e9 > > inet 10.2.1.2 netmask 0xffffff00 broadcast 10.2.1.255 > > media: Ethernet none > > > > and it is still crazy media changing. > > > > Because your PHY is not recognized it's expected result. :-( Today I got ordered Belkin F5D5055 USB controller. And I believe this controller is the same one as you have. With the previous patch it worked as expected on my box. axe0: on usbus7 axe0: PHYADDR 0xe0:0x01 miibus0: on axe0 truephy0: PHY 1 on miibus0 truephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto ue0: on axe0 ue0: Ethernet address: 00:22:75:d6:ab:88 ue0: link state changed to DOWN ue0: link state changed to UP And the performance number for the controller is also similar to other AX88178 gigabit controllers. So I guess axe(4) has no issue in handling Belkin F5D5055 USB controller but underlying ehci(4) could be behaving incorrectly. I believe this part could be explained/debugged by Hans. Mine is the following. ehci1 pnpinfo vendor=0x8086 device=0x3a6a subvendor=0x1028 subdevice=0x027f class=0x0c0320 at slot=29 function=7 Interrupt request lines: 23 I/O memory addresses: 0xff980000-0xff9803ff usbus7 uhub7 axe0 pnpinfo vendor=0x050d product=0x5055 devclass=0xff devsubclass=0xff sernum="" release=0x0001 intclass=0xff intsubclass=0xff at port=5 interface=0 miibus0 truephy0 pnpinfo oui=0xa0bc model=0x1 rev=0x4 at phyno=1 Hope this helps.