5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Prashanth K <quic_prashk@xxxxxxxxxxx> commit 5a444bea37e2759549ef72bfe83d1c8712e76b3d upstream. Upstream commit aba3a8d01d62 ("usb: gadget: u_serial: add suspend resume callbacks") added started_delayed flag, so that new ports which are opened after USB suspend can start IO while resuming. But if the port was already opened, and gadget suspend kicks in afterwards, start_delayed will never be set. This causes resume to bail out before calling gs_start_io(). Fix this by setting start_delayed during suspend. Fixes: aba3a8d01d62 ("usb: gadget: u_serial: add suspend resume callbacks") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Prashanth K <quic_prashk@xxxxxxxxxxx> Link: https://lore.kernel.org/r/20240730125754.576326-1-quic_prashk@xxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/gadget/function/u_serial.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/gadget/function/u_serial.c +++ b/drivers/usb/gadget/function/u_serial.c @@ -1438,6 +1438,7 @@ void gserial_suspend(struct gserial *gse spin_lock(&port->port_lock); spin_unlock(&serial_port_lock); port->suspended = true; + port->start_delayed = true; spin_unlock_irqrestore(&port->port_lock, flags); } EXPORT_SYMBOL_GPL(gserial_suspend);