freebsd-dev/share
Bill Paul ed63a7aaef This commit adds device driver support for the ADMtek AN986 Pegasus
USB ethernet chip. Adapters that use this chip include the LinkSys
USB100TX. There are a few others, but I'm not certain of their
availability in the U.S. I used an ADMtek eval board for development.
Note that while the ADMtek chip is a 100Mbps device, you can't really
get 100Mbps speeds over USB. Regardless, this driver uses miibus to
allow speed and duplex mode selection as well as autonegotiation.
Building and kldloading the driver as a module is also supported.

Note that in order to make this driver work, I had to make what some
may consider an ugly hack to sys/dev/usb/usbdi.c. The usbd_transfer()
function will use tsleep() for synchronous transfers that don't complete
right away. This is a problem since there are times when we need to
do sync transfers from an interrupt context (i.e. when reading registers
from the MAC via the control endpoint), where tsleep() us a no-no.
My hack allows the driver to have the code poll for transfer completion
subject to the xfer->timeout timeout rather that calling tsleep().
This hack is controlled by a quirk entry and is only enabled for the
ADMtek device.

Now, I'm sure there are a few of you out there ready to jump on me
and suggest some other approach that doesn't involve a busy wait. The
only solution that might work is to handle the interrupts in a kernel
thread, where you may have something resembling a process context that
makes it okay to tsleep(). This is lovely, except we don't have any
mechanism like that now, and I'm not about to implement such a thing
myself since it's beyond the scope of driver development. (Translation:
I'll be damned if I know how to do it.) If FreeBSD ever aquires such
a mechanism, I'll be glad to revisit the driver to take advantage of
it. In the meantime, I settled for what I perceived to be the solution
that involved the least amount of code changes. In general, the hit
is pretty light.

Also note that my only USB test box has a UHCI controller: I haven't
I don't have a machine with an OHCI controller available.

Highlights:

- Updated usb_quirks.* to add UQ_NO_TSLEEP quirk for ADMtek part.
- Updated usbdevs and regenerated generated files
- Updated HARDWARE.TXT and RELNOTES.TXT files
- Updated sysinstall/device.c and userconfig.c
- Updated kernel configs -- device aue0 is commented out by default
- Updated /sys/conf/files
- Added new kld module directory
1999-12-28 02:01:18 +00:00
..
colldef Add 8859-4 and lt_LT 1999-12-24 05:47:10 +00:00
dict Removed ex script left over from incomplete backout in previous commit. 1999-12-26 10:31:29 +00:00
doc To avoid confusion, zap libcurses. ncurses provides both curses, termcap 1999-11-26 09:28:33 +00:00
examples Add DOCSUPFILE, like PORTSSUPFILE. (ie 'make update' in /usr/doc) 1999-12-16 02:22:17 +00:00
info $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
isdn Added $FreeBSD$ tags. 1999-11-16 17:16:18 +00:00
man This commit adds device driver support for the ADMtek AN986 Pegasus 1999-12-28 02:01:18 +00:00
me $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
misc Duh! Also remove inter.phone from the makefile. 1999-12-23 09:28:49 +00:00
mk Fixed breakage of static linkage of rlogind. Someone added -lutil and 1999-12-27 17:25:40 +00:00
mklocale Fix cut&paste error 1999-12-24 08:05:20 +00:00
skel Comment out explicit MANPATH setting. 1999-12-21 17:18:19 +00:00
syscons Add iso04 fonts 1999-12-24 06:30:43 +00:00
tabset $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
termcap Oops, fix typo in prev. commit 1999-12-24 05:01:14 +00:00
timedef Link la_LN*4 too 1999-12-24 08:10:48 +00:00
zoneinfo Add $FreeBSD$ 1999-11-01 20:13:05 +00:00
Makefile Add colldef 1999-10-18 13:57:10 +00:00
Makefile.inc $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00