On Tue, Aug 06, 2024 at 08:09:18PM +0530, Manivannan Sadhasivam wrote: > Regarding your comment on patch 3/4, we already have the sysfs attribute > to control whether the device can be put into D3Cold or not and that is > directly coming from userspace. So there is no guarantee to assume that > D3Hot support is considered. If a device is not allowed to be suspended to D3cold, it will only be suspended to D3hot. If a port is put into anything deeper than D0, its secondary bus is no longer in B0 (PCI-PM r1.2 table 6-1) and children are inaccessible, so they're "effectively" in D3cold. Hence if a device cannot be suspended to D3cold, it will block all parent bridges from being suspended. That's what the logic in pci_bridge_d3_update() and pci_dev_check_d3cold() is doing. The d3cold_allowed attribute in sysfs is just one of several reasons why a device may not go to D3cold (see pci_dev_check_d3cold() for details). The d3cold_allowed attribute was originally intended to disable D3cold on devices where it was known to not work. Nowadays this should all be handled automatically, which is why we've discussed moving the attribute to debugfs: https://lore.kernel.org/all/20230918132424.GA11357@xxxxxxxxx/ https://lore.kernel.org/all/20231002181025.82746-1-mario.limonciello@xxxxxxx/ Thanks, Lukas