All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Valentina Manea <valentina.manea.m@gmail.com>,
	Shuah Khan <shuah@kernel.org>, Hongren Zheng <i@zenithal.me>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Brian G. Merrell" <bgmerrell@novell.com>
Cc: kernel@collabora.com, Greg Kroah-Hartman <gregkh@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] usb: vhci-hcd: Prevent suspending virtually attached devices
Date: Wed, 24 Sep 2025 20:01:55 +0300	[thread overview]
Message-ID: <71b47ce7-a799-42f1-acc7-e59e6ce13884@collabora.com> (raw)
In-Reply-To: <20250902-vhci-hcd-suspend-fix-v3-1-864e4e833559@collabora.com>

Hi,

On 9/2/25 3:15 PM, 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>
> ---
> The USB/IP Virtual Host Controller (VHCI) platform driver is expected to
> prevent entering system suspend when at least one remote device is
> attached to the virtual USB root hub.
> 
> However, in some cases, the detection logic for active USB/IP
> connections doesn't seem to work reliably, e.g. when all devices
> attached to the virtual hub have been already suspended.  This will
> normally lead to a broken suspend state, with unrecoverable resume.
> 
> The first patch of the series provides a workaround to ensure the
> virtually attached devices do not enter suspend.  Note this is currently
> limited to the client side (vhci_hcd) only, since the server side
> (usbip_host) doesn't implement system suspend prevention.
> 
> IMPORTANT:
> 
> Please note commit aa7a9275ab81 ("PM: sleep: Suspend async parents after
> suspending children") from v6.16-rc1 introduced a regression which
> breaks the suspend cancellation and hangs the system.
> 
> A fix [1] has been already provided, which also landed soon after in
> v6.16-rc7 under commit ebd6884167ea ("PM: sleep: Update power.completion
> for all devices on errors").
> 
> [1] https://lore.kernel.org/all/6191258.lOV4Wx5bFT@rjwysocki.net/
> ---
> Changes in v3:
> - Moved all driver cleanup patches to a separate series:
>   https://lore.kernel.org/all/20250902-vhci-hcd-cleanup-v1-0-1d46247cb234@collabora.com/
> - Replaced FIXME with NOTE in the new comment block, as it refers to a
>   potential cleanup of redundant code rather than addressing a
>   functional issue
> - Rebased remaining patch onto next-20250902
> - Link to v2: https://lore.kernel.org/r/20250726-vhci-hcd-suspend-fix-v2-0-189266dfdfaa@collabora.com

Just a kind reminder in case there's still a chance to get this and/or the
cleanup patches queued for v6.18.

Thanks,
Cristian

  reply	other threads:[~2025-09-24 17:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 12:15 [PATCH v3] usb: vhci-hcd: Prevent suspending virtually attached devices Cristian Ciocaltea
2025-09-24 17:01 ` Cristian Ciocaltea [this message]
2025-09-24 20:39   ` Shuah Khan

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=71b47ce7-a799-42f1-acc7-e59e6ce13884@collabora.com \
    --to=cristian.ciocaltea@collabora.com \
    --cc=bgmerrell@novell.com \
    --cc=gregkh@linuxfoundation.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.