FreeBSD src
Go to file
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
bin Mention the hostname variable in /etc/rc.conf since that is the most 1999-12-22 01:28:49 +00:00
contrib Fix zero-padding for printf formats which include a precision or 1999-12-23 18:24:31 +00:00
crypto This commit was generated by cvs2svn to compensate for changes in r55099, 1999-12-25 16:37:36 +00:00
etc Reset the Zoom 56K modem when starting to use it. 1999-12-27 08:39:29 +00:00
games Backout rev1.7, as it broke adventure(6) (const'ing a non-r/o variable). 1999-12-25 03:50:42 +00:00
gnu Fix cut-n-paste braino. 1999-12-22 05:34:56 +00:00
include Add a new function dllockinit() for registering thread locking 1999-12-27 04:44:04 +00:00
kerberos5 Bring in SRA for telnet. 1999-10-07 18:59:55 +00:00
kerberosIV Bring in SRA for telnet. 1999-10-07 18:59:55 +00:00
lib Tidy up some loose ends. nullfs_read/write were returning the wrong value. 1999-12-27 08:45:14 +00:00
libexec Add a new function dllockinit() for registering thread locking 1999-12-27 04:44:04 +00:00
release This commit adds device driver support for the ADMtek AN986 Pegasus 1999-12-28 02:01:18 +00:00
sbin Fix tab completion mounts (like /cdrom/) 1999-12-26 16:34:53 +00:00
secure RIP xntpd. 1999-12-22 19:15:02 +00:00
share This commit adds device driver support for the ADMtek AN986 Pegasus 1999-12-28 02:01:18 +00:00
sys This commit adds device driver support for the ADMtek AN986 Pegasus 1999-12-28 02:01:18 +00:00
tools Don't use -C internally. Use -c. For some reason files are not copied 1999-12-15 18:08:56 +00:00
usr.bin Correctly maintain state when manipulating linked lists. This fixes a 1999-12-27 20:53:35 +00:00
usr.sbin This commit adds device driver support for the ADMtek AN986 Pegasus 1999-12-28 02:01:18 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile Descent into sub-makes with a fixed PATH. The PATH does not contain 1999-12-23 13:53:44 +00:00
Makefile.inc0 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Makefile.inc1 Don't build caesar as a tool. fortune(6) doesn't depend on it 1999-12-23 19:18:28 +00:00
Makefile.upgrade $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
README $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
UPDATING Add import of ntpd 4.x 1999-12-19 23:51:50 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel and the contents of /etc.  Please see the top of the Makefile
in this directory for more information on the standard build targets
and compile-time flags.

Building a kernel with config(8) is a somewhat more involved process,
documentation for which can be found at:
   http://www.freebsd.org/handbook/kernelconfig.html
And in the config(8) man page.

The sample kernel configuration files reside in the sys/i386/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file LINT contains entries for all possible devices, not
just those commonly used, and is meant more as a general reference
than an actual kernel configuration file (a kernel built from it
wouldn't even run).


Source Roadmap:
---------------
bin		System/User commands.

contrib		Packages contributed by 3rd parties.

crypto		Export controlled stuff (see crypto/README).

etc		Template files for /etc

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberosIV	Kerberos package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		DES and DES-related utilities - NOT FOR EXPORT!

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/handbook/synching.html