]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add support for the so-called streams feature of BULK endpoints
authorHans Petter Selasky <hselasky@FreeBSD.org>
Sun, 12 Aug 2012 17:53:06 +0000 (17:53 +0000)
committerHans Petter Selasky <hselasky@FreeBSD.org>
Sun, 12 Aug 2012 17:53:06 +0000 (17:53 +0000)
commita5cf1aaaffd3716d6246b5214216c89e278bfce6
tree4ef3a2c09abbce548ca79a0652beee2be50d1199
parent5e6609a21ac77e27438f513843f24922981c9fe1
Add support for the so-called streams feature of BULK endpoints
in SUPER-speed mode, USB 3.0.

This feature has not been tested yet, due to lack of hardware.

This feature is useful when implementing protocols like UASP,
USB attached SCSI which promises higher USB mass storage throughput.

This patch also implements support for hardware processing of endpoints
for increased performance. The switching to hardware processing
of an endpoint is done via a callback to the USB controller driver. The
stream feature is implemented like a variant of a hardware USB protocol.

USB controller drivers implementing device mode needs to be updated to
implement the new "xfer_stall" USB controller method and remove the
"xfer" argument from the "set_stall" method.

The API's toward existing USB drivers are preserved. To setup a USB transfer
in stream mode, set the "stream_id" field of the USB config structure to
the desired value.

The maximum number of BULK streams is currently hardcoded and limited to 8
via a define in usb_freebsd.h.

All USB drivers should be re-compiled after this change.

LibUSB will be updated next week to support streams mode. A new IOCTL to
setup BULK streams as already been implemented. The ugen device nodes
currently only supports stream ID zero.

The FreeBSD version has been bumped.

MFC after: 2 weeks
21 files changed:
sys/dev/usb/controller/at91dci.c
sys/dev/usb/controller/atmegadci.c
sys/dev/usb/controller/avr32dci.c
sys/dev/usb/controller/dwc_otg.c
sys/dev/usb/controller/musb_otg.c
sys/dev/usb/controller/uss820dci.c
sys/dev/usb/controller/xhci.c
sys/dev/usb/controller/xhci.h
sys/dev/usb/usb.h
sys/dev/usb/usb_controller.h
sys/dev/usb/usb_core.h
sys/dev/usb/usb_debug.c
sys/dev/usb/usb_device.c
sys/dev/usb/usb_freebsd.h
sys/dev/usb/usb_generic.c
sys/dev/usb/usb_hub.c
sys/dev/usb/usb_ioctl.h
sys/dev/usb/usb_request.c
sys/dev/usb/usb_transfer.c
sys/dev/usb/usbdi.h
sys/sys/param.h