9
0
Fork 0
barebox/drivers/usb/gadget
Robert Jarzmik 1085ce6157 usb: add flow control to u_serial
When using the serial console over USB to download files, and
when the USB bandwidth is pushed to its limits, the barebox UDC
device won't be able to absorb all the traffic.

Modify the u_serial gadget so that if there is not enough room
in buffers, don't push USB requests down the gadget driver, so
that it is saturated, and give it a chance to NAK requests.

The previous behaviour was loosing bytes (as kfifo_put is lossy).
The fixed behavious is lossless (based on USB NAK protocol).

While at it, increase a bit buffer sizes to 8kB to absorb heavy
transfers such as a linux kernel image.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-29 08:33:16 +01:00
..
Kconfig usb: gadget: enable for MXS 2012-07-25 09:27:28 +02:00
Makefile at91: add udc usb device controller support 2011-12-14 12:41:15 +01:00
at91_udc.c switch all platform_bus device/driver registering to platform_driver/device_register 2012-10-04 15:19:12 +02:00
at91_udc.h at91_udc: update vbus param only if updated 2012-01-02 12:08:25 +01:00
composite.c Treewide: remove address of the Free Software Foundation 2012-09-17 10:57:41 +02:00
config.c Add USB device support 2009-09-25 14:31:26 +02:00
dfu.c Treewide: remove address of the Free Software Foundation 2012-09-17 10:57:41 +02:00
epautoconf.c Treewide: remove address of the Free Software Foundation 2012-09-17 10:57:41 +02:00
f_acm.c serial gadget: enable/disable on request 2012-01-04 14:18:46 +01:00
f_serial.c usb/gadget: add USB serial connect and disconnect 2011-12-05 17:59:02 +01:00
fsl_udc.c switch all platform_bus device/driver registering to platform_driver/device_register 2012-10-04 15:19:12 +02:00
gadget_chips.h Add USB device support 2009-09-25 14:31:26 +02:00
pxa27x_udc.c switch all platform_bus device/driver registering to platform_driver/device_register 2012-10-04 15:19:12 +02:00
pxa27x_udc.h Treewide: remove address of the Free Software Foundation 2012-09-17 10:57:41 +02:00
serial.c serial gadget: enable/disable on request 2012-01-04 14:18:46 +01:00
u_serial.c usb: add flow control to u_serial 2012-10-29 08:33:16 +01:00
u_serial.h Add USB device support 2009-09-25 14:31:26 +02:00
usbstring.c Add USB device support 2009-09-25 14:31:26 +02:00