From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Cc: Valentina Manea <valentina.manea.m@gmail.com>,
Shuah Khan <shuah@kernel.org>, Hongren Zheng <i@zenithal.me>,
"Brian G. Merrell" <bgmerrell@novell.com>,
kernel@collabora.com, Greg Kroah-Hartman <gregkh@suse.de>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 01/18] usb: vhci-hcd: Prevent suspending virtually attached devices
Date: Sat, 26 Jul 2025 09:06:13 +0200 [thread overview]
Message-ID: <2025072637-google-referable-dc99@gregkh> (raw)
In-Reply-To: <20250726-vhci-hcd-suspend-fix-v2-1-189266dfdfaa@collabora.com>
On Sat, Jul 26, 2025 at 01:08:03AM +0300, Cristian Ciocaltea wrote:
> 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>
> ---
> drivers/usb/usbip/vhci_hcd.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
> index e70fba9f55d6a0edf3c5fde56a614dd3799406a1..b4b0ed5d64966214636b157968478600e2e4178a 100644
> --- a/drivers/usb/usbip/vhci_hcd.c
> +++ b/drivers/usb/usbip/vhci_hcd.c
> @@ -765,6 +765,17 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
> ctrlreq->wValue, vdev->rhport);
>
> vdev->udev = usb_get_dev(urb->dev);
> + /*
> + * FIXME: A similar operation has been done via
> + * USB_REQ_GET_DESCRIPTOR handler below, which is
> + * supposed to always precede USB_REQ_SET_ADDRESS.
When is this FIXME going to be addressed and by whom?
> + *
> + * It's not entirely clear if operating on a different
> + * usb_device instance here is a real possibility,
> + * otherwise this call and vdev->udev assignment above
> + * should be dropped.
What is going to need to happen to figure this out?
thanks,
greg k-h
next prev parent reply other threads:[~2025-07-26 7:06 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 22:08 [PATCH v2 00/18] USB/IP VHCI suspend fix and driver cleanup Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 01/18] usb: vhci-hcd: Prevent suspending virtually attached devices Cristian Ciocaltea
2025-07-26 6:43 ` Greg Kroah-Hartman
2025-07-26 7:06 ` Greg Kroah-Hartman [this message]
2025-07-28 10:03 ` Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 02/18] usb: vhci-hcd: Ensure lines do not end with '(' Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 03/18] usb: vhci-hcd: Consistently use the braces Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 04/18] usb: vhci-hcd: Avoid unnecessary use of braces Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 05/18] usb: vhci-hcd: Consistently use blank lines Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 06/18] usb: vhci-hcd: Drop spaces after casts Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 07/18] usb: vhci-hcd: Add spaces around operators Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 08/18] usb: vhci-hcd: Drop unnecessary parentheses Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 09/18] usb: vhci-hcd: Fix open parenthesis alignment Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 10/18] usb: vhci-hcd: Simplify NULL comparison Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 11/18] usb: vhci-hcd: Simplify kzalloc usage Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 12/18] usb: vhci-hcd: Use the paranthesized form of sizeof Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 13/18] usb: vhci-hcd: Fix block comments Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 14/18] usb: vhci-hcd: Remove ftrace-like logging Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 15/18] usb: vhci-hcd: Consistently use __func__ Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 16/18] usb: vhci-hcd: Do not split quoted strings Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 17/18] usb: vhci-hcd: Switch to dev_err_probe() in probe path Cristian Ciocaltea
2025-07-25 22:08 ` [PATCH v2 18/18] usb: vhci-hcd: Replace pr_*() with dev_*() logging Cristian Ciocaltea
2025-07-26 6:43 ` [PATCH v2 00/18] USB/IP VHCI suspend fix and driver cleanup Greg Kroah-Hartman
2025-07-28 9:41 ` Cristian Ciocaltea
2025-08-27 9:14 ` Cristian Ciocaltea
2025-08-29 16:33 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025072637-google-referable-dc99@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=bgmerrell@novell.com \
--cc=cristian.ciocaltea@collabora.com \
--cc=gregkh@suse.de \
--cc=i@zenithal.me \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=valentina.manea.m@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).