Skip to content

Commit e64d5fa

Browse files
bus: mhi: host: pci_generic: Add missing poweroff() PM callback
During hibernation process, once thaw() stage completes, the MHI endpoint devices will be in M0 state post recovery. After that, the devices will be powered down so that the system can enter the target sleep state. During this stage, the PCI core will put the devices in D3hot. But this transition is allowed by the MHI spec. The devices can only enter D3hot when it is in M3 state. So for fixing this issue, let's add the poweroff() callback that will get executed before putting the system in target sleep state during hibernation. This callback will power down the device properly so that it could be restored during restore() or thaw() stage. Cc: [email protected] Fixes: 5f0c2ee ("bus: mhi: pci-generic: Fix hibernation") Reported-by: Hemant Kumar <[email protected]> Suggested-by: Hemant Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Manivannan Sadhasivam <[email protected]>
1 parent 3123109 commit e64d5fa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/bus/mhi/host/pci_generic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,7 @@ static const struct dev_pm_ops mhi_pci_pm_ops = {
10851085
.resume = mhi_pci_resume,
10861086
.freeze = mhi_pci_freeze,
10871087
.thaw = mhi_pci_restore,
1088+
.poweroff = mhi_pci_freeze,
10881089
.restore = mhi_pci_restore,
10891090
#endif
10901091
};

0 commit comments

Comments
 (0)