* [PATCH v1] ucsi_ccg: Disable async suspend in ucsi_ccg_probe()
@ 2025-05-12 13:26 Rafael J. Wysocki
2025-05-13 7:42 ` Heikki Krogerus
2025-05-21 11:11 ` Greg Kroah-Hartman
0 siblings, 2 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2025-05-12 13:26 UTC (permalink / raw)
To: Linux PM
Cc: LKML, Jon Hunter, Saravana Kannan, Heikki Krogerus,
Greg Kroah-Hartman, linux-usb
From: Jon Hunter <jonathanh@nvidia.com>
Commit aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending
children") had triggered a suspend issue on Tegra boards because it had
reordered the syspend of devices with async suspend enabled with respect
to some other devices. Specifically, the devices with async suspend
enabled that have no children are now suspended before any other devices
unless there are device links pointing to them as suppliers.
The investigation that followed the failure report uncovered that async
suspend was enabled for the cypd4226 device that was a Type-C controller
with a dependency on USB PHY and it turned out that disabling async
suspend for that device made the issue go away. Since async suspend
takes dependencies between parents and children into account as well
as other dependencies between devices represented by device links, this
means that the cypd4226 has a dependency on another device that is
not represented in any form in the kernel (a "hidden" dependency), in
which case async suspend should not be enabled for it.
Accordingly, make ucsi_ccg_probe() disable async suspend for the
devices handled by, which covers the cypd4226 device on the Tegra
boards as well as other devices likely to have similar "hidden"
dependencies.
Fixes: aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children")
Closes: https://lore.kernel.org/linux-pm/c6cd714b-b0eb-42fc-b9b5-4f5f396fb4ec@nvidia.com/
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
Commit aa7a9275ab81 is in linux-next and it has not reached the mainline yet.
Thanks!
---
drivers/usb/typec/ucsi/ucsi_ccg.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -1483,6 +1483,8 @@
i2c_set_clientdata(client, uc);
+ device_disable_async_suspend(uc->dev);
+
pm_runtime_set_active(uc->dev);
pm_runtime_enable(uc->dev);
pm_runtime_use_autosuspend(uc->dev);
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v1] ucsi_ccg: Disable async suspend in ucsi_ccg_probe()
2025-05-12 13:26 [PATCH v1] ucsi_ccg: Disable async suspend in ucsi_ccg_probe() Rafael J. Wysocki
@ 2025-05-13 7:42 ` Heikki Krogerus
2025-05-21 11:11 ` Greg Kroah-Hartman
1 sibling, 0 replies; 4+ messages in thread
From: Heikki Krogerus @ 2025-05-13 7:42 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM, LKML, Jon Hunter, Saravana Kannan, Greg Kroah-Hartman,
linux-usb
On Mon, May 12, 2025 at 03:26:53PM +0200, Rafael J. Wysocki wrote:
> From: Jon Hunter <jonathanh@nvidia.com>
>
> Commit aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending
> children") had triggered a suspend issue on Tegra boards because it had
> reordered the syspend of devices with async suspend enabled with respect
> to some other devices. Specifically, the devices with async suspend
> enabled that have no children are now suspended before any other devices
> unless there are device links pointing to them as suppliers.
>
> The investigation that followed the failure report uncovered that async
> suspend was enabled for the cypd4226 device that was a Type-C controller
> with a dependency on USB PHY and it turned out that disabling async
> suspend for that device made the issue go away. Since async suspend
> takes dependencies between parents and children into account as well
> as other dependencies between devices represented by device links, this
> means that the cypd4226 has a dependency on another device that is
> not represented in any form in the kernel (a "hidden" dependency), in
> which case async suspend should not be enabled for it.
>
> Accordingly, make ucsi_ccg_probe() disable async suspend for the
> devices handled by, which covers the cypd4226 device on the Tegra
> boards as well as other devices likely to have similar "hidden"
> dependencies.
>
> Fixes: aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children")
> Closes: https://lore.kernel.org/linux-pm/c6cd714b-b0eb-42fc-b9b5-4f5f396fb4ec@nvidia.com/
> Reported-by: Jon Hunter <jonathanh@nvidia.com>
> Tested-by: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
>
> Commit aa7a9275ab81 is in linux-next and it has not reached the mainline yet.
>
> Thanks!
>
> ---
> drivers/usb/typec/ucsi/ucsi_ccg.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- a/drivers/usb/typec/ucsi/ucsi_ccg.c
> +++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
> @@ -1483,6 +1483,8 @@
>
> i2c_set_clientdata(client, uc);
>
> + device_disable_async_suspend(uc->dev);
> +
> pm_runtime_set_active(uc->dev);
> pm_runtime_enable(uc->dev);
> pm_runtime_use_autosuspend(uc->dev);
>
>
--
heikki
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v1] ucsi_ccg: Disable async suspend in ucsi_ccg_probe()
2025-05-12 13:26 [PATCH v1] ucsi_ccg: Disable async suspend in ucsi_ccg_probe() Rafael J. Wysocki
2025-05-13 7:42 ` Heikki Krogerus
@ 2025-05-21 11:11 ` Greg Kroah-Hartman
2025-05-21 11:24 ` Rafael J. Wysocki
1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-21 11:11 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM, LKML, Jon Hunter, Saravana Kannan, Heikki Krogerus,
linux-usb
On Mon, May 12, 2025 at 03:26:53PM +0200, Rafael J. Wysocki wrote:
> From: Jon Hunter <jonathanh@nvidia.com>
>
> Commit aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending
> children") had triggered a suspend issue on Tegra boards because it had
> reordered the syspend of devices with async suspend enabled with respect
> to some other devices. Specifically, the devices with async suspend
> enabled that have no children are now suspended before any other devices
> unless there are device links pointing to them as suppliers.
>
> The investigation that followed the failure report uncovered that async
> suspend was enabled for the cypd4226 device that was a Type-C controller
> with a dependency on USB PHY and it turned out that disabling async
> suspend for that device made the issue go away. Since async suspend
> takes dependencies between parents and children into account as well
> as other dependencies between devices represented by device links, this
> means that the cypd4226 has a dependency on another device that is
> not represented in any form in the kernel (a "hidden" dependency), in
> which case async suspend should not be enabled for it.
>
> Accordingly, make ucsi_ccg_probe() disable async suspend for the
> devices handled by, which covers the cypd4226 device on the Tegra
> boards as well as other devices likely to have similar "hidden"
> dependencies.
>
> Fixes: aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children")
> Closes: https://lore.kernel.org/linux-pm/c6cd714b-b0eb-42fc-b9b5-4f5f396fb4ec@nvidia.com/
> Reported-by: Jon Hunter <jonathanh@nvidia.com>
> Tested-by: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> Commit aa7a9275ab81 is in linux-next and it has not reached the mainline yet.
I'm guessing that's in your tree, so can you take this through that?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v1] ucsi_ccg: Disable async suspend in ucsi_ccg_probe()
2025-05-21 11:11 ` Greg Kroah-Hartman
@ 2025-05-21 11:24 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2025-05-21 11:24 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Rafael J. Wysocki, Linux PM, LKML, Jon Hunter, Saravana Kannan,
Heikki Krogerus, linux-usb
On Wed, May 21, 2025 at 1:11 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Mon, May 12, 2025 at 03:26:53PM +0200, Rafael J. Wysocki wrote:
> > From: Jon Hunter <jonathanh@nvidia.com>
> >
> > Commit aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending
> > children") had triggered a suspend issue on Tegra boards because it had
> > reordered the syspend of devices with async suspend enabled with respect
> > to some other devices. Specifically, the devices with async suspend
> > enabled that have no children are now suspended before any other devices
> > unless there are device links pointing to them as suppliers.
> >
> > The investigation that followed the failure report uncovered that async
> > suspend was enabled for the cypd4226 device that was a Type-C controller
> > with a dependency on USB PHY and it turned out that disabling async
> > suspend for that device made the issue go away. Since async suspend
> > takes dependencies between parents and children into account as well
> > as other dependencies between devices represented by device links, this
> > means that the cypd4226 has a dependency on another device that is
> > not represented in any form in the kernel (a "hidden" dependency), in
> > which case async suspend should not be enabled for it.
> >
> > Accordingly, make ucsi_ccg_probe() disable async suspend for the
> > devices handled by, which covers the cypd4226 device on the Tegra
> > boards as well as other devices likely to have similar "hidden"
> > dependencies.
> >
> > Fixes: aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children")
> > Closes: https://lore.kernel.org/linux-pm/c6cd714b-b0eb-42fc-b9b5-4f5f396fb4ec@nvidia.com/
> > Reported-by: Jon Hunter <jonathanh@nvidia.com>
> > Tested-by: Jon Hunter <jonathanh@nvidia.com>
> > Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > ---
> >
> > Commit aa7a9275ab81 is in linux-next and it has not reached the mainline yet.
>
> I'm guessing that's in your tree, so can you take this through that?
Sure.
Done already.
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-21 11:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 13:26 [PATCH v1] ucsi_ccg: Disable async suspend in ucsi_ccg_probe() Rafael J. Wysocki
2025-05-13 7:42 ` Heikki Krogerus
2025-05-21 11:11 ` Greg Kroah-Hartman
2025-05-21 11:24 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox