linux/drivers/usb/gadget
Sebastian Andrzej Siewior a54c979fed usb: gadget: dummy_hcd: complete stream support
dummy_hcd provides (alloc|free)_stream() callbacks but there are not
doing anything. The transfer side also lacks matching of streams. This
patch changes this and implements stream allocation / de-allocation
support and proper urb <=> req matching.
The UDC side exposes a limit of 16 streams. DWC3, the only USB3 UDC has
no limitations in this regard except that it _needs_ to know that
streams will be used at the ep_enable time. At the host side, there is
no real limit either: XHCI can allocate any number of streams as long as
it does not run out of memory. The UAS gadget currently requests 16
streams and the UAS host side fallbacks from the requested 256 down to
16 which is fine.
From the UASP point of view (the only specified user), the number of
used streams does not really matter. The only limitation is that the
host may not use a higher stream than the gadget requested and can deal
with.

The dummy stream support has been modelled after current UAS + XHCI +
DWC3 + UASP usage which helps me testing:
- the device announces that each ep supports 16 streams (even it could
  more than that).
- the device side looks into Companion descriptor at ep_enable time and
  enables them according to it.
- the host side tries to enable the requested number of streams but the
  upper limit is the Comanion descriptor. None (zero streams) is an
  error condition, less is okay.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-01-24 11:39:49 +02:00
..
acm_ms.c usb: gadget: add new usb gadget for ACM and mass storage 2011-10-13 20:46:27 +03:00
amd5536udc.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
amd5536udc.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
at91_udc.c Cleanups on various subarchitectures 2012-01-09 14:21:03 -08:00
at91_udc.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
atmel_usba_udc.c usb: gadget: replace usb_gadget::is_dualspeed with max_speed 2011-12-12 11:45:11 +02:00
atmel_usba_udc.h
audio.c usb: gadget: add max_speed to usb_composite_driver 2011-07-01 14:27:05 -07:00
cdc2.c usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
ci13xxx_msm.c USB: ci13xxx_msm: add module license 2011-11-14 11:51:28 -08:00
ci13xxx_pci.c USB: gadget: Introduce ci13xxx_udc_driver struct 2010-12-10 14:23:33 -08:00
ci13xxx_udc.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
ci13xxx_udc.h USB: ci13xxx_udc: handle controllers with less than 16 EPs 2011-12-12 11:44:45 +02:00
composite.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
config.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
dbgp.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
dummy_hcd.c usb: gadget: dummy_hcd: complete stream support 2012-01-24 11:39:49 +02:00
epautoconf.c Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
ether.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
f_acm.c usb: gadget: use config_ep_by_speed() instead of ep_choose() 2011-06-28 11:14:37 -07:00
f_audio.c usb: gadget: audio: queue wLength-sized requests 2011-09-09 13:06:06 +03:00
f_ecm.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
f_eem.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
f_fs.c Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
f_hid.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
f_loopback.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
f_mass_storage.c Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
f_midi.c usb: gadget: fix MIDI gadget jack allocation 2011-11-14 11:51:25 -08:00
f_ncm.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
f_obex.c usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
f_phonet.c net: remove netdev_alloc_page and use __GFP_COLD 2011-11-22 16:43:32 -05:00
f_rndis.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
f_serial.c usb: gadget: fix g_serial regression 2011-11-29 23:19:03 +09:00
f_sourcesink.c usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
f_subset.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
f_uvc.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
f_uvc.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
file_storage.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
fsl_mxc_udc.c usb: fsl_mxc_udc.c: Remove compile-time dependency of MX35 SoC type 2011-11-29 23:19:04 +09:00
fsl_qe_udc.c Merge branch 'for-next/gadget' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next 2011-12-13 09:37:40 -08:00
fsl_qe_udc.h usb: fix a typo in a comment 2011-04-13 16:41:00 -07:00
fsl_udc_core.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
fsl_usb2_udc.h usb: gadget: fsl_udc: fix dequeuing a request in progress 2011-11-29 23:19:04 +09:00
fusb300_udc.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
fusb300_udc.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
g_ffs.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
g_zero.h
gadget_chips.h usb: gadget: introduce gadget_is_dwc3() 2011-08-22 16:00:46 -07:00
gmidi.c usb: Add module.h to drivers/usb consumers who really use it. 2011-10-31 19:31:25 -04:00
goku_udc.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
goku_udc.h usb: gadget: goku_udc: add registered flag bit, fixing build 2010-11-11 06:57:24 -08:00
hid.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
imx_udc.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
imx_udc.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
inode.c Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
Kconfig Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
langwell_udc.c usb: gadget: replace usb_gadget::is_dualspeed with max_speed 2011-12-12 11:45:11 +02:00
langwell_udc.h usb: gadget: langwell: convert to new style 2011-10-13 20:39:55 +03:00
m66592-udc.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
m66592-udc.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
Makefile usb: gadget: mv_udc: drop ARCH dependency 2011-12-20 12:55:06 +02:00
mass_storage.c usb: gadget: storage: add superspeed support 2011-10-13 20:39:59 +03:00
multi.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
mv_udc_core.c usb: gadget: mv_udc: remove unneeded NULL check 2012-01-24 11:31:56 +02:00
mv_udc.h usb: gadget: mv_udc: drop ARCH dependency 2011-12-20 12:55:06 +02:00
ncm.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
ndis.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
net2272.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
net2272.h USB: net2272: driver for PLX NET2272 USB device controller 2011-06-06 16:47:27 -07:00
net2280.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
net2280.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
nokia.c usb: gadget: add max_speed to usb_composite_driver 2011-07-01 14:27:05 -07:00
omap_udc.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
omap_udc.h
pch_udc.c usb: gadget: pch_udc: Add debug message 2012-01-24 11:35:38 +02:00
printer.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
pxa25x_udc.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
pxa25x_udc.h usb: gadget: pxa25x: is_vbus_present is gone 2011-10-13 20:39:53 +03:00
pxa27x_udc.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
pxa27x_udc.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
r8a66597-udc.c usb: gadget: rename usb_gadget_driver::speed to max_speed 2011-12-12 11:45:12 +02:00
r8a66597-udc.h usb: gadget: r8a66597-udc: add support for SUDMAC 2011-10-13 20:38:39 +03:00
rndis.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
rndis.h USB: rndis: section mismatch fix 2010-09-03 17:33:40 -07:00
s3c2410_udc.c Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2012-01-09 12:09:47 -08:00
s3c2410_udc.h misc latin1 to utf8 conversions 2012-01-02 13:04:55 +01:00
s3c-hsotg.c Merge branch 'for-next/gadget' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next 2011-12-13 09:37:40 -08:00
s3c-hsudc.c usb: s3c-hsudc: add basic runtime_pm calls 2012-01-24 11:33:21 +02:00
serial.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
storage_common.c usb: gadget: storage: add superspeed support 2011-10-13 20:39:59 +03:00
u_audio.c usb: g_audio: Fix crash at driver removal 2010-12-03 12:05:35 -08:00
u_audio.h
u_ether.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
u_ether.h usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
u_phonet.h
u_serial.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
u_serial.h usb: gadget: add usb_endpoint_descriptor to struct usb_ep 2011-06-28 11:14:36 -07:00
udc-core.c usb: gadget: replace usb_gadget::is_dualspeed with max_speed 2011-12-12 11:45:11 +02:00
usbstring.c USB: remove homegrown UTF conversion routine for gadgets 2011-11-18 10:51:01 -08:00
uvc_queue.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
uvc_queue.h V4L/DVB: uvc: Fix multiple symbols definitions with UVC gadget and host drivers 2010-07-11 17:45:10 -03:00
uvc_v4l2.c Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2011-10-25 12:23:15 +02:00
uvc_video.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
uvc.h Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb 2011-10-25 12:23:15 +02:00
webcam.c usb gadget: clean up FSF boilerplate text 2011-09-09 16:00:09 -07:00
zero.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30