linux-stable/drivers/usb/gadget
Sergey Organov dcfc1ec7bb usb: gadget: serial: fix Tx stall after buffer overflow
[ Upstream commit e4bfded56c ]

Symptom: application opens /dev/ttyGS0 and starts sending (writing) to
it while either USB cable is not connected, or nobody listens on the
other side of the cable. If driver circular buffer overflows before
connection is established, no data will be written to the USB layer
until/unless /dev/ttyGS0 is closed and re-opened again by the
application (the latter besides having no means of being notified about
the event of establishing of the connection.)

Fix: on open and/or connect, kick Tx to flush circular buffer data to
USB layer.

Signed-off-by: Sergey Organov <sorganov@gmail.com>
Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-03-11 14:14:49 +01:00
..
function usb: gadget: serial: fix Tx stall after buffer overflow 2020-03-11 14:14:49 +01:00
legacy usb: gadget: legacy: set max_speed to super-speed 2020-02-11 04:33:55 -08:00
udc usb: gadget: udc: fix possible sleep-in-atomic-context bugs in gr_probe() 2020-02-24 08:34:37 +01:00
composite.c usb: gadget: composite: Support more than 500mA MaxPower 2020-03-11 14:14:48 +01:00
config.c
configfs.c usb: gadget: configfs: Fix missing spin_lock_init() 2019-12-17 20:34:28 +01:00
configfs.h
epautoconf.c
functions.c
Kconfig
Makefile
u_f.c
u_f.h
u_os_desc.h
usbstring.c