Skip to content

Commit 5a444be

Browse files
Prashanth Kgregkh
authored andcommitted
usb: gadget: u_serial: Set start_delayed during suspend
Upstream commit aba3a8d ("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: aba3a8d ("usb: gadget: u_serial: add suspend resume callbacks") Cc: [email protected] Signed-off-by: Prashanth K <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3c52608 commit 5a444be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/gadget/function/u_serial.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,7 @@ void gserial_suspend(struct gserial *gser)
14411441
spin_lock(&port->port_lock);
14421442
spin_unlock(&serial_port_lock);
14431443
port->suspended = true;
1444+
port->start_delayed = true;
14441445
spin_unlock_irqrestore(&port->port_lock, flags);
14451446
}
14461447
EXPORT_SYMBOL_GPL(gserial_suspend);

0 commit comments

Comments
 (0)