9
0
Fork 0
barebox/drivers/usb
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
..
core Merge branch 'for-next/remove-fsf-address' 2012-10-03 21:12:48 +02:00
gadget usb: add flow control to u_serial 2012-10-29 08:33:16 +01:00
host switch all platform_bus device/driver registering to platform_driver/device_register 2012-10-04 15:19:12 +02:00
otg Treewide: remove address of the Free Software Foundation 2012-09-17 10:57:41 +02:00
storage Treewide: remove address of the Free Software Foundation 2012-09-17 10:57:41 +02:00
Kconfig USB mass storage device driver initial implementation 2011-09-23 08:53:22 +02:00
Makefile USB mass storage device driver initial implementation 2011-09-23 08:53:22 +02:00