Ax88172 vs FreeBSD USB stack
Bill Paul
wpaul at FreeBSD.ORG
Fri Mar 28 10:38:59 PST 2003
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."
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".)
-Bill
--
=============================================================================
-Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu
wpaul at windriver.com | Wind River Systems
=============================================================================
"If stupidity were a handicap, you'd have the best parking spot."
=============================================================================
More information about the freebsd-hackers
mailing list