Ax88172 vs FreeBSD USB stack
Bill Paul
wpaul at FreeBSD.ORG
Sat Mar 29 14:43:10 PST 2003
Ok, I figured it out. Turns out the AX88172 only has one interface after
all, in spite of what the manual says. Maybe the info about the second
interface was a holdover from the AX88170 datasheet which they forgot to
expunge. Or maybe ASIX is on crack.
Anyway, I discovered I was doing two things wrong:
1) The RX control register has to be set correctly to enable the RX
filter on the MAC. The AX88172 datasheet doesn't tell you what the
bits in the RX control byte mean. The AX88170 datasheet does, but
only documents bits 0 through 4. It forgets to mention that you
must also turn on bit 7. If you don't set this bit, you don't
receive any packets.
2) For transmission, you must initialize the three inter-packet gap
(IPG) registers correctly. They are unset by default, and until
they are set, the MAC won't send any frames.
Now that I fixed these two things, the driver works. In fact, I'm
using it to type this e-mail right now. :) I uploaded a copy to:
http://www.freebsd.org/~wpaul/ASIX/USB
All it really needs is for me to fix the multicast filtering. Right now,
it defaults to all multicast mode. I need to fill in the axe_setmulti()
function so that it sets up the hash table correctly. I think I also need
to fix promisc mode.
This code is for 5.0-RELEASE or better.
-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