From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 28 11:23:24 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C91637B407; Fri, 28 Mar 2003 11:23:23 -0800 (PST) Received: from scl8owa02.int.exodus.net (scl8out02.exodus.net [66.35.230.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id E26594414B; Fri, 28 Mar 2003 11:21:08 -0800 (PST) (envelope-from Maksim.Yevmenkin@cw.com) Received: from scl8owa01.int.exodus.net ([66.35.230.241]) by scl8owa02.int.exodus.net with Microsoft SMTPSVC(5.0.2195.5329); Fri, 28 Mar 2003 11:20:25 -0800 Received: from exodus.net ([165.193.27.35]) by scl8owa01.int.exodus.net over TLS secured channel with Microsoft SMTPSVC(5.0.2195.5329); Fri, 28 Mar 2003 11:20:25 -0800 Message-ID: <3E849FA7.1000400@exodus.net> Date: Fri, 28 Mar 2003 11:16:55 -0800 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021126 X-Accept-Language: en-us, ru, en MIME-Version: 1.0 To: ticso@cicely.de References: <20030328183858.7B2DB37B401@hub.freebsd.org> <20030328185650.GK23168@cicely9.cicely.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Mar 2003 19:20:25.0101 (UTC) FILETIME=[157D0BD0:01C2F55F] X-Spam-Status: No, hits=-22.1 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: Bill Paul cc: hackers@freebsd.org cc: ticso@cicely9.cicely.de Subject: Re: Ax88172 vs FreeBSD USB stack X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2003 19:23:27 -0000 Just FYI ng_ubt(4) (/sys/netgraph/bluetooth/drivers/ubt) driver (Bluetooth USB devices) makes use of two interfaces. thanks, max Bernd Walter wrote: > On Fri, Mar 28, 2003 at 10:38:58AM -0800, Bill Paul wrote: > >>So. I picked up a Linksys USB200M USB 2.0 ethernet adapter that uses >>the ASIX Electronics AX88172 chip, and I started cobbling together a >>driver. This chip uses a series of vendor specific commands to do >>things like read/write the MII management interface on the MAC, >>read/write the SROM, set the RX filter, multicast hash table, etc. >>I can do all this no problem. The Linksys NIC uses a RealTek 8201L >>PHY, and I can attach it and negotiate a link. >> >>However I can't send or receive any packets. >> >>Like all the other USB NICs, packet transfer is supposed to done >>via bulk in/bulk out endpoints, and I can open these endpoints >>and initiate transfers just fine, but nothing ever happens. Transmit >>attempts don't yield any packets on the wire, and I never get any >>RX transfer completions. (I can see the activity LED on the NIC >>blink when a frame arrives though.) One thing I have not attempted >>to do yet (but may try this weekend) is to directly read the RX or >>TX SRAM (there are commands to let you do this). >> >>Frankly, I'm a bit stumped. It looks as though I'm doing everything >>correctly, but I can't explain why the bulk transfers don't work. >>Clearly, the control endpoint works, since I can issue commands. There >>doesn't appear to be any special command that one has to issue to >>enable/disable the receiver or transmitter on the MAC. >> >>I have only one possible explanation. The manual for the AX88172 >>(http://www.freebsd.org/~wpaul/ASIX/Ax88172.PDF) says the following: >> >>"The AX88172 supports 2 interfaces, the interface 0 is Data Interface >>and interface 1 is for Communication interface." > > > If that is true - the device has a strange design. > Normaly devices use single interfaces with multiple commucations > channels. > An interface in USB wording is something like a virtual device - > similar to functions on pci. > E.g. you can have an umass device on interface 0 and a keyboard on > interface 1. > The FreeBSD USB stack supports mutltiple interfaces, but currently > doesn't support probing different drivers for different interfaces on > the same device. > > However you can try usbctl from usbutils to get an overview of the > device. > I have made a port, it is actually being reviewed by a port commiter, > which you can get on: http://www.cosmo-project.de/~bernd/usbutil.tgz > > >>However the USB stack disagrees with the manual on this point: it >>steadfastly insists that configuration 1 has only 1 interface. So >>my question, for any USB gurus out there, is: is it possible that >>the USB stack is wrong on this point, and I really need to be >>using interface 1 for bulk in/out transfers? I'm a little suspicious >>at this point, because the stack can't seem to even read the >>device ID string correctly. (It identifies the chip only as "vendor >>0x77b, device 0x2226".) > > > Strange - let us see what usbctl says - it never failed for me. > > BTW: I doubt that USB 1.x vs USB 2.0 make a difference in the problem > you are seeing, but in case you want to test later. > The EHCI patch is available under: > http://www.cosmo-project.de/~bernd/ehci.patch > It is currently not tested against any device, but the controller > probes fine and scanning the root hub (without devices) did not fail. >