]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: u_serial: Set start_delayed during suspend
authorPrashanth K <quic_prashk@quicinc.com>
Tue, 30 Jul 2024 12:57:54 +0000 (18:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 13:34:28 +0000 (15:34 +0200)
commit3abba6e6f62fdfe07e533ad8dca7622e9ed13622
tree5224ccc88d5a026e0a5b42df94ba6da710beb275
parent9f865526d7254420e9831bb1d88be41fcf1727ea
usb: gadget: u_serial: Set start_delayed during suspend

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@vger.kernel.org
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
Link: https://lore.kernel.org/r/20240730125754.576326-1-quic_prashk@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/u_serial.c