From 2a3dece5e13e7d9a2e22faa89e71b166330d3fa6 Mon Sep 17 00:00:00 2001 From: Bhaumik Bhatt Date: Thu, 16 Sep 2021 16:36:12 -0700 Subject: [PATCH] bus: mhi: host: Address pending BW requests for legacy mode It cannot be guaranteed that certain legacy mode controllers stay in M0 while a BW request is being processed. Ensure that those pending BW requests are addressed when M0 entry occurs after a BW request is processed but not responded to. Change-Id: I15ebc4e61e59ceeb5e8740b60bb95606945b0b3c Signed-off-by: Bhaumik Bhatt Signed-off-by: Lazarus Motha --- drivers/bus/mhi/host/pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bus/mhi/host/pm.c b/drivers/bus/mhi/host/pm.c index e09fd2956f2d..1e730889fb4b 100644 --- a/drivers/bus/mhi/host/pm.c +++ b/drivers/bus/mhi/host/pm.c @@ -298,6 +298,8 @@ int mhi_pm_m0_transition(struct mhi_controller *mhi_cntrl) if (mhi_cmd->ring.rp != mhi_cmd->ring.wp) mhi_ring_cmd_db(mhi_cntrl, mhi_cmd); spin_unlock_irq(&mhi_cmd->lock); + /* ring misc doorbells for certain controllers */ + mhi_misc_dbs_pending(mhi_cntrl); } /* Ring channel DB registers */