linux-stable/drivers/usb/gadget/function
Sergey Organov e4bfded56c usb: gadget: serial: fix Tx stall after buffer overflow
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>
2020-02-11 08:45:45 +02:00
..
f_acm.c usb: gadget: u_serial: allow more console gadget ports 2019-10-22 10:27:12 +03:00
f_ecm.c usb: gadget: f_ecm: Use atomic_t to track in-flight request 2020-01-15 10:40:22 +01:00
f_eem.c USB: gadget: function: fix issue Unneeded variable: "value" 2019-07-03 10:58:44 +03:00
f_fs.c usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags 2020-02-11 08:45:45 +02:00
f_hid.c
f_loopback.c
f_mass_storage.c usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt 2019-08-12 08:55:24 +03:00
f_mass_storage.h
f_midi.c
f_ncm.c usb: gadget: f_ncm: Use atomic_t to track in-flight request 2020-01-15 10:40:16 +01:00
f_obex.c usb: gadget: u_serial: make OBEX port not a console 2019-10-22 10:27:09 +03:00
f_phonet.c
f_printer.c
f_rndis.c usb: gadget: fix wrong endpoint desc 2019-12-10 14:56:10 +02:00
f_serial.c usb: gadget: u_serial: allow more console gadget ports 2019-10-22 10:27:12 +03:00
f_sourcesink.c
f_subset.c
f_tcm.c usb: gadget: f_tcm: Provide support to get alternate setting in tcm function 2019-10-22 10:37:29 +03:00
f_uac1.c
f_uac1_legacy.c
f_uac2.c
f_uvc.c
f_uvc.h
g_zero.h
Makefile
ndis.h
rndis.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
rndis.h
storage_common.c
storage_common.h Revert "usb: gadget: storage: Remove warning message" 2019-07-04 13:05:59 +02:00
tcm.h
u_audio.c usb: gadget: u_audio: Fix high-speed max packet size 2020-02-11 08:45:45 +02:00
u_audio.h
u_ecm.h
u_eem.h
u_ether.c usb: Replace snprintf with scnprintf in gether_get_ifname 2019-06-20 08:53:11 +03:00
u_ether.h
u_ether_configfs.h
u_fs.h
u_gether.h
u_hid.h
u_midi.h
u_ncm.h
u_phonet.h
u_printer.h
u_rndis.h
u_serial.c usb: gadget: serial: fix Tx stall after buffer overflow 2020-02-11 08:45:45 +02:00
u_serial.h usb: gadget: u_serial: allow more console gadget ports 2019-10-22 10:27:12 +03:00
u_tcm.h
u_uac1.h
u_uac1_legacy.c
u_uac1_legacy.h
u_uac2.h
u_uvc.h
uvc.h
uvc_configfs.c
uvc_configfs.h
uvc_queue.c
uvc_queue.h
uvc_v4l2.c
uvc_v4l2.h
uvc_video.c
uvc_video.h