]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: u_ether: Set is_suspend flag if remote wakeup fails
authorPrashanth K <prashanth.k@oss.qualcomm.com>
Wed, 12 Feb 2025 10:08:40 +0000 (15:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:02:11 +0000 (13:02 +0100)
commit840afbea3fa729f35fa585975c1610cb09d68006
treedd39f5b946d51bbe6185d7d22b7bc12760272e18
parente5aac1c9b2974636db7ce796ffa6de88fa08335e
usb: gadget: u_ether: Set is_suspend flag if remote wakeup fails

commit 17c2c87c37862c3e95b55f660681cc6e8d66660e upstream.

Currently while UDC suspends, u_ether attempts to remote wakeup
the host if there are any pending transfers. However, if remote
wakeup fails, the UDC remains suspended but the is_suspend flag
is not set. And since is_suspend flag isn't set, the subsequent
eth_start_xmit() would queue USB requests to suspended UDC.

To fix this, bail out from gether_suspend() only if remote wakeup
operation is successful.

Cc: stable <stable@kernel.org>
Fixes: 0a1af6dfa077 ("usb: gadget: f_ecm: Add suspend/resume and remote wakeup support")
Signed-off-by: Prashanth K <prashanth.k@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250212100840.3812153-1-prashanth.k@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/u_ether.c