Re: [PATCH v2] usb: gadget: serial: fix Tx stall after buffer overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 21, 2020 at 07:42:16AM +0300, Sergey Organov wrote:
> 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@xxxxxxxxx>
> ---
> 
> Changes in v2:
> 
> - Add comment to document why tty_wakeup() is kept in place
> - Don't add debug print
> - Remove NOTE from description

Reviewed-by: Michał Mirosław <mirq-linux@xxxxxxxxxxxx>

Best Regards,
Michał Mirosław



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux