Sync USB support (host controller part) with FreeBSD6.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 10 Dec 2006 02:03:57 +0000 (02:03 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 10 Dec 2006 02:03:57 +0000 (02:03 +0000)
commit281cf3c222f1d29cf86fb64363cb98d542f649c3
tree4937ac10eb7d661b75778d1ceb951baa4bef234a
parentb791d05aa8d4b31dccf163654b528eff399fea31
Sync USB support (host controller part) with FreeBSD6.

Following changes on FreeBSD-CURRENT(by iedowse@freebsd.org) are merged:
ehci.c rev 1.52
ohci.c rev 1.167
uhci.c rev 1.172
usb.c rev 1.111
usbdi.h rev 1.61
"Use a different task queue for host controller and peripheral driver
 tasks. Since the host controllers rely on tasks to process transfer
 timeouts, if a synchronous transfer from a driver was invoked from
 a task and timed out, it would never complete because the single
 task thread was stuck performing the synchronous transfer so couldn't
 process the timeout."

As of this commit, only following kernel APIs are changed:
- usbd_get_string_desc() takes one more argument which returns the actual
  size of the string description.
- usb_add_task() takes one more argument.  The extra arguemnt is used
  to specify to which task queue the task should be added.  There is
  two task queues defined, one for peripheral driver (USB_TASKQ_DRIVER),
  one for host controller (USB_TASKQ_HC).

ugen(4) is adapted according to the above kernel API changes.

Thank all of the folks for their work on the USB support.

Tested-by:
swildner@, vbd@, joerg@(1.6 backport), Max Herrgard <herrgard@gmail.com>

# Though VT6202 is supported by ehci(4), I still have problems with this
# chip, even with the updated ehci(4).
26 files changed:
sys/bus/usb/ehci.c
sys/bus/usb/ehci_pci.c
sys/bus/usb/ehcireg.h
sys/bus/usb/ehcivar.h
sys/bus/usb/hid.c
sys/bus/usb/ohci.c
sys/bus/usb/ohci_pci.c
sys/bus/usb/ohcireg.h
sys/bus/usb/ohcivar.h
sys/bus/usb/uhci.c
sys/bus/usb/uhci_pci.c
sys/bus/usb/uhcireg.h
sys/bus/usb/uhcivar.h
sys/bus/usb/uhub.c
sys/bus/usb/usb.c
sys/bus/usb/usb.h
sys/bus/usb/usb_ethersubr.c
sys/bus/usb/usb_quirks.c
sys/bus/usb/usb_quirks.h
sys/bus/usb/usb_subr.c
sys/bus/usb/usbdi.c
sys/bus/usb/usbdi.h
sys/bus/usb/usbdi_util.c
sys/bus/usb/usbdi_util.h
sys/bus/usb/usbdivar.h
sys/dev/usbmisc/ugen/ugen.c