linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] usb: host: enable suspend-to-RAM control in userspace
       [not found] <20240202084815.3064391-1-guanyulin@google.com>
@ 2024-02-02 14:51 ` Mathias Nyman
  2024-02-02 14:57   ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Mathias Nyman @ 2024-02-02 14:51 UTC (permalink / raw)
  To: Guan-Yu Lin, gregkh, mathias.nyman, stern, royluo,
	benjamin.tissoires, hadess, heikki.krogerus, grundler, oneukum,
	dianders, yajun.deng
  Cc: linux-kernel, linux-usb, USB, Linux PM list, Rafael J. Wysocki

On 2.2.2024 10.42, Guan-Yu Lin wrote:
> In systems with both a main processor and a co-processor, asynchronous
> controller management can lead to conflicts. For example, the main
> processor might attempt to suspend a USB device while the co-processor
> is actively transferring data. To address this, we introduce a new
> sysfs entry, "disable_suspend2ram", which allows userspace to control
> the suspend-to-RAM functionality of devices on a specific USB bus.
> Since the userspace has visibility into the activities of both
> processors, it can resolve potential conflicts.
> 
> Signed-off-by: Guan-Yu Lin <guanyulin@google.com>
> ---

Doesn't setting this new disable_suspend2ram break system suspend on all
other systems except this one?

On any system with a PCI xHC we end up trying to suddenly stop the xHC
host with all connected usb devices still fully up and running.

In the xhci platform device case again nothing will be stopped or suspended,
but PM framework assumes everything is suspended correctly.

So then xHC either continues running and generates interrupts, or it might
be abruptly powered off if the bus above it suspends.
(For example if the xhci platform device is created by a PCI DWC3, and it
goes to D3 state)

EHCI and other hosts face similar issues with trying to suspend the
controller when the devices connected to it are fully up and running.

To me it looks like this whole co-processor case needs to be developed and
designed into the pm framework

Thanks
Mathias


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: host: enable suspend-to-RAM control in userspace
  2024-02-02 14:51 ` [PATCH] usb: host: enable suspend-to-RAM control in userspace Mathias Nyman
@ 2024-02-02 14:57   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2024-02-02 14:57 UTC (permalink / raw)
  To: Mathias Nyman
  Cc: Guan-Yu Lin, mathias.nyman, stern, royluo, benjamin.tissoires,
	hadess, heikki.krogerus, grundler, oneukum, dianders, yajun.deng,
	linux-kernel, linux-usb, Linux PM list, Rafael J. Wysocki

On Fri, Feb 02, 2024 at 04:51:06PM +0200, Mathias Nyman wrote:
> To me it looks like this whole co-processor case needs to be developed and
> designed into the pm framework

That is what was said for the last time this patch was submitted, but
for some reason the author ignored those review comments :(

thanks for saying it again, don't worry, I'm not taking this change.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-02 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20240202084815.3064391-1-guanyulin@google.com>
2024-02-02 14:51 ` [PATCH] usb: host: enable suspend-to-RAM control in userspace Mathias Nyman
2024-02-02 14:57   ` Greg KH

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).