aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2/hcd_intr.c
diff options
context:
space:
mode:
authorSimon Arlott <simon@octiron.net>2023-08-20 20:13:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-22 14:46:11 +0200
commit09867af36969067d89c96ab1452656977f30e22a (patch)
treecabeda0f16da38deac88780bd560f02259f0bbb5 /drivers/usb/dwc2/hcd_intr.c
parent4b3cd783808bb327d931bbb1324d6c367443b721 (diff)
USB: cdc-acm: support flushing write buffers (TCOFLUSH)
If the serial device never reads data written to it (because it is "output only") then the write buffers will still be waiting for the URB to complete on close(), which will hang for 30s until the closing_wait timeout expires. This can happen with the ESP32-H2/ESP32-C6 USB serial interface. Changing the port closing_wait timeout is a privileged operation but flushing the output buffer is not a privileged operation. Implement the flush_buffer tty operation to cancel in-progress writes so that tcflush(fd, TCOFLUSH) can be used to unblock the serial port before close. Signed-off-by: Simon Arlott <simon@octiron.net> Link: https://lore.kernel.org/r/555fbc4c-043b-8932-fb9b-a208d61ffbe4@0882a8b5-c6c3-11e9-b005-00805fc181fe.uuid.home.arpa Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2/hcd_intr.c')
0 files changed, 0 insertions, 0 deletions