bus: mhi: host: pci_generic: Flush recovery worker during freeze
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Fri, 8 Apr 2022 15:00:39 +0000 (20:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 07:14:30 +0000 (09:14 +0200)
commit34b5d2aa355a8d57ec2fc5e83496c46b381eb8ed
tree8a2db191800f750dc68703b821d7813a6fbc409b
parentb3d21deabcbeaf16e539ae5611655e45e4212ee0
bus: mhi: host: pci_generic: Flush recovery worker during freeze

commit c38f83bae4037023827c85e045841d0421f85034 upstream.

It is possible that the recovery work might be running while the freeze
gets executed (during hibernation etc.,). Currently, we don't powerdown
the stack if it is not up but if the recovery work completes after freeze,
then the device will be up afterwards. This will not be a sane situation.

So let's flush the recovery worker before trying to powerdown the device.

Cc: stable@vger.kernel.org
Fixes: 5f0c2ee1fe8d ("bus: mhi: pci-generic: Fix hibernation")
Reported-by: Bhaumik Vasav Bhatt <quic_bbhatt@quicinc.com>
Reviewed-by: Bhaumik Vasav Bhatt <quic_bbhatt@quicinc.com>
Link: https://lore.kernel.org/r/20220408150039.17297-1-manivannan.sadhasivam@linaro.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/mhi/pci_generic.c