From owner-freebsd-net@FreeBSD.ORG Wed Jun 16 17:51:25 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F2DD1065670 for ; Wed, 16 Jun 2010 17:51:25 +0000 (UTC) (envelope-from perevalov84@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id DE7E28FC13 for ; Wed, 16 Jun 2010 17:51:24 +0000 (UTC) Received: by bwz8 with SMTP id 8so837063bwz.13 for ; Wed, 16 Jun 2010 10:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=9B89mdzSvaXLJFY008MjR+Irfe1WGn3elNeVaDesa1k=; b=hlrXNXbrUvq5KqXnIh/yxKItbo51rRp6ZtPwXAjb8DJv5WBSjXuGr53kaH0H/fNLn2 x+fSvYkyIsz+MX33CMkMNZwX/4b69THa+2i7RdGTJPbgzh5io5lBOxP8GDngQUJwTxF5 lnbDcN9a/o65C11fn+nslqtE+VdhdVzTuXKCU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=cvTCgxefmZZPIpArgNjgqr58TrmLlruuagt+Iv6AMGB56ZJjZQwVH0TGAteq80kFPc ZCRX+VCPNNtb89Lqs+QfKLrGrtXdEHmm8wroFtQWaHpCD5nIOX/fYCwSdNVQECdKNhto gyYBNtiOmMiTjAMz1zggi4v4dyigjzSoU8UE8= Received: by 10.204.138.91 with SMTP id z27mr563985bkt.162.1276710683200; Wed, 16 Jun 2010 10:51:23 -0700 (PDT) Received: from [192.168.2.2] ([92.47.75.65]) by mx.google.com with ESMTPS id z17sm30283969bkx.12.2010.06.16.10.51.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 16 Jun 2010 10:51:21 -0700 (PDT) Message-ID: <4C190EC9.50006@gmail.com> Date: Wed, 16 Jun 2010 22:50:01 +0500 From: Sergey Perevalov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100506 Thunderbird/3.0.4 MIME-Version: 1.0 To: pyunyh@gmail.com References: <4BE44E2D.6060907@gmail.com> <4C148135.7080704@gmail.com> <20100614211155.GB4257@michelle.cdnetworks.com> <201006150706.03039.hselasky@c2i.net> <20100615194912.GJ4257@michelle.cdnetworks.com> <20100615225227.GL4257@michelle.cdnetworks.com> <4C188D17.7020108@gmail.com> In-Reply-To: <4C188D17.7020108@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: [axe][ue0] Device send packets but any host in network can not receive any packet from it. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2010 17:51:25 -0000 On 16.06.2010 13:36, Sergey Perevalov wrote: > On 16.06.2010 03:52, Pyun YongHyeon wrote: >> On Tue, Jun 15, 2010 at 12:49:12PM -0700, Pyun YongHyeon wrote: >>> On Tue, Jun 15, 2010 at 07:06:02AM +0200, Hans Petter Selasky wrote: >>>> On Monday 14 June 2010 23:11:55 Pyun YongHyeon wrote: >>>>> On Sun, Jun 13, 2010 at 11:56:53AM +0500, Sergey Perevalov wrote: >>>>>> On 04.06.2010 02:46, Pyun YongHyeon wrote: >>>>>>> On Thu, Jun 03, 2010 at 06:51:00PM +0500, Perevalov Sergey wrote: >>>>>>>> On 02.06.2010 03:24, Pyun YongHyeon wrote: >>>>>>>>> On Tue, Jun 01, 2010 at 11:31:13PM +0500, Perevalov Sergey wrote: >>>>>>>>>> Hi! >>>>>>>>>> I tried it with crossover cable but results was the same bad. >>>>>>>>>> Then >>>>>>>>>> set debug flag hw.usb.axe.debug: to 15, and started ping -f from >>>>>>>>>> ue0. And in /var/log/messages I found these strings: >>>>>>>>>> >>>>>>>>>> Jun 1 22:28:34 laptop kernel: axe_bulk_read_callback:842: >>>>>>>>>> bulk read >>>>>>>>>> error, USB_ERR_CANCELLED >>>>>>>>>> Jun 1 22:28:35 laptop kernel: axe_bulk_write_callback:870: >>>>>>>>>> transfer >>>>>>>>>> complete >>>>>>>>>> Jun 1 22:29:12 laptop kernel: axe_bulk_write_callback:941: >>>>>>>>>> transfer >>>>>>>>>> error, USB_ERR_TIMEOUT >>>>>>>>>> Jun 1 22:29:51 laptop last message repeated 4 times >>>>>>>>>> Jun 1 22:31:40 laptop last message repeated 11 times >>>>>>>>>> >>>>>>>>>> Then i googled it and found this >>>>>>>>>> http://www.mail-archive.com/freebsd-usb@freebsd.org/msg04388.html >>>>>>>>>> >>>>>>>>>> the problem is described definitely like mine. >>>>>>>>>> I read all thread and found the patch usb2_ethernet.patch2, >>>>>>>>>> but I >>>>>>>>>> havn't found >>>>>>>>>> sys/dev/usb2/ethernet/usb2_ethernet.c file for patch. >>>>>>>>>> >>>>>>>>>> how can I try to apply this patch to my system? >>>>>>>>>> http://www.mail-archive.com/freebsd-usb@freebsd.org/msg04403.html >>>>>>>>>> >>>>>>>>> I believe the bug in the thread was fixed long time ago. >>>>>>>>> If you're using 8.0-RELEASE, try latest stable/8 or >>>>>>>>> 8.1-PRERELEASE and see whether axe(4) works or not. >>>>>>>> I have just finished testing device on my updated freebsd: >>>>>>>> FreeBSD homeserv 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #0: Thu >>>>>>>> Jun 3 >>>>>>>> 17:22:44 UTC 2010 >>>>>>>> user@homeserv:/usr/obj/usr/src/sys/GENERIC i386 >>>>>>>> And it still shows the same problem when I try to ping -f any >>>>>>>> host from >>>>>>>> ue0: >>>>>>>> >>>>>>>> Jun 3 18:29:40 homeserv kernel: ue0: link state changed to UP >>>>>>>> Jun 3 18:29:42 homeserv kernel: axe_bulk_write_callback: transfer >>>>>>>> complete >>>>>>>> Jun 3 18:29:42 homeserv last message repeated 21 times >>>>>>>> Jun 3 18:29:52 homeserv kernel: axe_bulk_write_callback: transfer >>>>>>>> error, USB_ERR_TIMEOUT >>>>>>> I don't see abnormal things in axe(4). Maybe Hans can help(CCed). >>>>>>> >>>>>>>> Jun 3 18:30:21 homeserv last message repeated 3 times >>>>>> Hi, Pyun! >>>>>> I would send this device to you for solve this problem, if you do >>>>>> not >>>>>> mind. Because, I can't use it in my FreeBSD system. >>>>>> So, if you interested send me in private message your address and >>>>>> I will >>>>>> send it as soon as possible. >>>>> Thanks for the offer. I already have two variants of AX88178 based >>>>> controller and both work fine without problems. I vaguely guess >>>>> it could be related with ehci(4) as I don't see offending code in >>>>> axe(4). Of course, this does not necessary mean axe(4) is bug free >>>>> but I couldn't find clue yet. >>>>> Hans, can you see other possible cause of the issue? >>>>> >>>> Hi, >>>> >>>> I think it is a protocol issue. Maybe they created a new USB >>>> protocol ? >>>> >>> Hmm, it seems that AX88178 requires some special GPIO magic for >>> RealTek PHY before accessing the PHY. I guess the magic in axe(4) >>> is for Marvell PHY so it may/may not work for other AX88178 >>> controllers. I also vaguely remember AX88178 with ET1101 PHY works >>> on my box but it does not work well on other user's box. I thought >>> it could be related with ehci(4) controller at that time but now I >>> guess it came from missing GPIO magic in axe(4) for the specific >>> PHY. It seems ASIX now requires login to get data sheet so I have >>> no programming information for GPIO. My old data sheet for AX88178 >>> didn't even mention GPIO handling. It seems Vendor's linux driver >>> contains some magic for GPIO handling so I'll see what can I get >>> from that. >>> >> Ok, try patch at the following URL. >> http://people.freebsd.org/~yongari/axe/axe.phy.diff >> >> I tested it against two AX88178 controllers which uses truephy(4) >> and ciphy(4). Both works as expected. >> > > Hi Pyun! > I have just finished testing your patch. But unfortunately without > success. > I applied patch by command: > > #patch -p1 < ~/axe.phy.diff > > Then I did make buildkernel and make installkernel: > > FreeBSD laptop 8.0-RELEASE-p3 FreeBSD 8.0-RELEASE-p3 #0: Wed Jun 16 > 12:22:29 AQTT 2010 salam4ik@laptop:/usr/obj/usr/src/sys/GENERIC i386 > > But it still doesn't work:-( I switched on debugging by sysctl > hw.usb.axe.debug=15 then started ping -f 192.168.2.4 > And in /var/log/messages appear records: > > Jun 16 13:09:32 laptop kernel: axe_bulk_write_callback:914: transfer > complete > Jun 16 13:09:40 laptop last message repeated 73 times > Jun 16 13:09:49 laptop kernel: axe_bulk_write_callback:985: transfer > error, USB_ERR_TIMEOUT > > I have found cd that I got with this device, and I sent drivers from > it for linux to you in private message with attach. > I have just finished test this device under FreeBSD 7.3 Release. So, issue is present again:-( Here some info: uname -a FreeBSD 7.3-RELEASE FreeBSD 7.3-RELEASE #0: Sun Mar 21 06:15:01 UTC 2010 root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 dmesg: axe0: on uhub4 axe0: AX88178, bufsz 4096, boundary 512 miibus1: on axe0 rgephy0: PHY 2 on miibus1 rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto axe0: WARNING: using obsoleted if_watchdog interface axe0: WARNING: using obsoleted IFF_NEEDSGIANT flag axe0: Ethernet address: 00:0e:c6:88:09:4e /var/log/messages: Jun 16 21:49:08 root: Unknown USB device: vendor 0x0b95 product 0x1780 bus uhub4 Jun 16 21:49:08 kernel: axe0: on uhub4 Jun 16 21:49:08 kernel: axe0: AX88178, bufsz 4096, boundary 512 Jun 16 21:49:09 kernel: miibus1: on axe0 Jun 16 21:49:09 kernel: rgephy0: PHY 2 on miibus1 Jun 16 21:49:09 kernel: rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto Jun 16 21:49:09 kernel: axe0: WARNING: using obsoleted if_watchdog interface Jun 16 21:49:09 kernel: axe0: WARNING: using obsoleted IFF_NEEDSGIANT flag Jun 16 21:49:09 kernel: axe0: Ethernet address: 00:0e:c6:88:09:4e Jun 16 21:49:09 kernel: axe0: link state changed to DOWN Jun 16 21:50:07 kernel: axe0: link state changed to UP Jun 16 21:53:41 kernel: axe0: watchdog timeout Jun 16 21:53:41 kernel: axe0: usb error on tx: IN_PROGRESS Jun 16 21:53:47 kernel: axe0: usb error on tx: TIMEOUT -- Regards, Sergey.