linux-sg2042/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
..
Makefile
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 USB: gadget: f_hid: fix deadlock in f_hidg_write() 2019-03-20 10:58:48 +02:00
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 usb: gadget: storage: Remove reference counting 2018-07-26 13:55:39 +03:00
f_midi.c - Introduce arithmetic overflow test helper functions (Rasmus) 2018-06-06 17:27:14 -07:00
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 usb: gadget: Potential NULL dereference on allocation error 2019-01-14 10:29:55 +02:00
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 usb: gadget: function: sync f_uac1 ac header baInterfaceNr 2019-02-07 13:14:51 +02:00
f_uac1_legacy.c usb: gadget: do not use __constant_cpu_to_le16 2019-05-03 09:13:48 +03:00
f_uac2.c usb: gadget: f_uac2: disable IN/OUT ep if unused 2018-10-02 10:45:36 +03:00
f_uvc.c media: usb/gadget/f_uvc: set device_caps in struct video_device 2019-06-05 08:47:44 -04:00
f_uvc.h usb: gadget: uvc: Minimize #include in headers 2018-07-26 13:33:44 +03:00
g_zero.h
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 usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
u_eem.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
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 usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
u_fs.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
u_gether.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
u_hid.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
u_midi.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
u_ncm.h usb: gadget: f_ncm: Add OS descriptor support 2019-05-03 09:13:47 +03:00
u_phonet.h
u_printer.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
u_rndis.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
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 usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
u_uvc.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
uvc.h usb: gadget: uvc: add uvcg_warn macro 2019-01-28 12:51:30 +02:00
uvc_configfs.c usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
uvc_configfs.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
uvc_queue.c usb: gadget: uvc: constify vb2_ops structure 2018-11-26 09:06:32 +02:00
uvc_queue.h usb: gadget: uvc: Minimize #include in headers 2018-07-26 13:33:44 +03:00
uvc_v4l2.c media: usb/gadget/f_uvc: set device_caps in struct video_device 2019-06-05 08:47:44 -04:00
uvc_v4l2.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
uvc_video.c usb: gadget: uvc: Replace plain printk() with dev_*() 2018-09-25 18:41:00 +03:00
uvc_video.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00