Skip to content

Commit e90d20c

Browse files
committed
Merge tag 'mhi-fixes-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-linus
Manivannan writes: MHI fixes for v5.18 Couple of patches fixing the hibernation issue seen on MHI endpoint devices like SDX65 modems: - During hibernation, the host puts the device into D3cold after thaw() stage. But at that time, the device would be in M0 state. So the device emits a warning (not visible to the host but to device firmware only) stating invalid transition. This is fixed by adding a poweroff() callback that puts the device into M3 before D3cold. - There is a possibility that the recovery worker might be running while trying to powerdown the device. So flush the recovery worker before that. * tag 'mhi-fixes-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: Flush recovery worker during freeze bus: mhi: host: pci_generic: Add missing poweroff() PM callback
2 parents ce522ba + c38f83b commit e90d20c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/bus/mhi/host/pci_generic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,7 @@ static int __maybe_unused mhi_pci_freeze(struct device *dev)
10601060
* the intermediate restore kernel reinitializes MHI device with new
10611061
* context.
10621062
*/
1063+
flush_work(&mhi_pdev->recovery_work);
10631064
if (test_and_clear_bit(MHI_PCI_DEV_STARTED, &mhi_pdev->status)) {
10641065
mhi_power_down(mhi_cntrl, true);
10651066
mhi_unprepare_after_power_down(mhi_cntrl);
@@ -1085,6 +1086,7 @@ static const struct dev_pm_ops mhi_pci_pm_ops = {
10851086
.resume = mhi_pci_resume,
10861087
.freeze = mhi_pci_freeze,
10871088
.thaw = mhi_pci_restore,
1089+
.poweroff = mhi_pci_freeze,
10881090
.restore = mhi_pci_restore,
10891091
#endif
10901092
};

0 commit comments

Comments
 (0)