Skip to content

Commit

Permalink
Merge tag 'mhi-fixes-v5.18' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/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
  • Loading branch information
Greg Kroah-Hartman committed Apr 22, 2022
2 parents ce522ba + c38f83b commit e90d20c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/bus/mhi/host/pci_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,7 @@ static int __maybe_unused mhi_pci_freeze(struct device *dev)
* the intermediate restore kernel reinitializes MHI device with new
* context.
*/
flush_work(&mhi_pdev->recovery_work);
if (test_and_clear_bit(MHI_PCI_DEV_STARTED, &mhi_pdev->status)) {
mhi_power_down(mhi_cntrl, true);
mhi_unprepare_after_power_down(mhi_cntrl);
Expand All @@ -1085,6 +1086,7 @@ static const struct dev_pm_ops mhi_pci_pm_ops = {
.resume = mhi_pci_resume,
.freeze = mhi_pci_freeze,
.thaw = mhi_pci_restore,
.poweroff = mhi_pci_freeze,
.restore = mhi_pci_restore,
#endif
};
Expand Down

0 comments on commit e90d20c

Please sign in to comment.