]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: vhci-hcd: Prevent suspending virtually attached devices
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tue, 2 Sep 2025 12:15:46 +0000 (15:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:37 +0000 (11:56 +0200)
commitf71f5eea513049f60d70b432292e26ada2645e6c
treec3ec4817aca6ef4c3fc5aeff2c8c641cc5fd8f1b
parentfa153fb40c61f8ca01237427c97a0b93ba32c403
usb: vhci-hcd: Prevent suspending virtually attached devices

[ Upstream commit e40b984b6c4ce3f80814f39f86f87b2a48f2e662 ]

The VHCI platform driver aims to forbid entering system suspend when at
least one of the virtual USB ports are bound to an active USB/IP
connection.

However, in some cases, the detection logic doesn't work reliably, i.e.
when all devices attached to the virtual root hub have been already
suspended, leading to a broken suspend state, with unrecoverable resume.

Ensure the virtually attached devices do not enter suspend by setting
the syscore PM flag.  Note this is currently limited to the client side
only, since the server side doesn't implement system suspend prevention.

Fixes: 04679b3489e0 ("Staging: USB/IP: add client driver")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250902-vhci-hcd-suspend-fix-v3-1-864e4e833559@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/usbip/vhci_hcd.c