Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Dec 1999 18:01:19 -0800 (PST)
From:      Bill Paul <wpaul@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/usb if_aue.c if_auereg.h usb_quirks.c usb_quirks.h usbdevs usbdevs.h usbdevs_data.h usbdi.c src/sys/modules Makefile src/sys/modules/aue Makefile src/sys/i386/conf GENERIC LINT NEWCARD PCCARD src/sys/i386/i386 ...
Message-ID:  <199912280201.SAA74725@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       1999/12/27 18:01:19 PST

  Modified files:
    sys/dev/usb          usb_quirks.c usb_quirks.h usbdevs 
                         usbdevs.h usbdevs_data.h usbdi.c 
    sys/modules          Makefile 
    sys/i386/conf        GENERIC LINT NEWCARD PCCARD 
    sys/i386/i386        userconfig.c 
    sys/alpha/conf       GENERIC 
    release/sysinstall   devices.c 
    release/texts/alpha  HARDWARE.TXT RELNOTES.TXT 
    release/texts/i386   HARDWARE.TXT RELNOTES.TXT 
    share/man/man4       Makefile 
    sys/conf             files 
    sys/boot/forth       loader.conf 
  Added files:
    sys/dev/usb          if_aue.c if_auereg.h 
    sys/modules/aue      Makefile 
    share/man/man4       aue.4 
  Log:
  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
  
  Revision  Changes    Path
  1.15      +5 -1      src/sys/dev/usb/usb_quirks.c
  1.11      +3 -1      src/sys/dev/usb/usb_quirks.h
  1.2       +13 -1     src/sys/dev/usb/usbdevs
  1.24      +13 -5     src/sys/dev/usb/usbdevs.h
  1.24      +39 -15    src/sys/dev/usb/usbdevs_data.h
  1.30      +15 -2     src/sys/dev/usb/usbdi.c
  1.100     +3 -3      src/sys/modules/Makefile
  1.220     +2 -1      src/sys/i386/conf/GENERIC
  1.706     +5 -1      src/sys/i386/conf/LINT
  1.12      +2 -1      src/sys/i386/conf/NEWCARD
  1.37      +2 -1      src/sys/i386/conf/PCCARD
  1.165     +3 -2      src/sys/i386/i386/userconfig.c
  1.56      +2 -1      src/sys/alpha/conf/GENERIC
  1.112     +2 -1      src/release/sysinstall/devices.c
  1.7       +4 -0      src/release/texts/alpha/HARDWARE.TXT
  1.12      +15 -3     src/release/texts/alpha/RELNOTES.TXT
  1.30      +4 -0      src/release/texts/i386/HARDWARE.TXT
  1.45      +15 -3     src/release/texts/i386/RELNOTES.TXT
  1.68      +2 -2      src/share/man/man4/Makefile
  1.308     +2 -1      src/sys/conf/files
  1.22      +2 -2      src/sys/boot/forth/loader.conf



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912280201.SAA74725>