Commit f227b246 authored by Qiang Yu's avatar Qiang Yu Committed by Manivannan Sadhasivam
Browse files

bus: mhi: host: pci_generic: Add pm_runtime_forbid() in remove callback



Add pm_runtime_forbid() to balance the pm_runtime_allow() call made
during Mission Mode transition. Without this, the device remains in runtime
PM allowed state even after driver removal.

Fixes: 855a70c1 ("bus: mhi: Add MHI PCI support for WWAN modems")
Signed-off-by: default avatarQiang Yu <qiang.yu@oss.qualcomm.com>
[mani: moved pm_runtime_forbid() to the start of remove()]
Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260303-b4-async_power_on-v2-2-d3db81eb457d@oss.qualcomm.com
parent cfdb41ad
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1452,6 +1452,7 @@ static void mhi_pci_remove(struct pci_dev *pdev)
	struct mhi_pci_device *mhi_pdev = pci_get_drvdata(pdev);
	struct mhi_controller *mhi_cntrl = &mhi_pdev->mhi_cntrl;

	pm_runtime_forbid(&pdev->dev);
	pci_disable_sriov(pdev);

	if (pdev->is_physfn)