Message ID | 87sgjyzewl.fsf@osv.gnss.ru (mailing list archive) |
---|---|
State | Mainlined |
Commit | e4bfded56cf39b8d02733c1e6ef546b97961e18a |
Headers | show |
Series | [v3] usb: gadget: serial: fix Tx stall after buffer overflow | expand |
diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c index f986e5c..8167d37 100644 --- a/drivers/usb/gadget/function/u_serial.c +++ b/drivers/usb/gadget/function/u_serial.c @@ -561,8 +561,10 @@ static int gs_start_io(struct gs_port *port) port->n_read = 0; started = gs_start_rx(port); - /* unblock any pending writes into our circular buffer */ if (started) { + gs_start_tx(port); + /* Unblock any pending writes into our circular buffer, in case + * we didn't in gs_start_tx() */ tty_wakeup(port->port.tty); } else { gs_free_requests(ep, head, &port->read_allocated);