From: Greg Kroah-Hartman Date: Sun, 11 Jul 2021 15:59:26 +0000 (+0200) Subject: drop queue-5.12/bus-mhi-core-fix-power-down-latency.patch X-Git-Tag: v5.4.132~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1b738824176915e72d9ea32b3372cfaaf12a721;p=thirdparty%2Fkernel%2Fstable-queue.git drop queue-5.12/bus-mhi-core-fix-power-down-latency.patch --- diff --git a/queue-5.12/bus-mhi-core-fix-power-down-latency.patch b/queue-5.12/bus-mhi-core-fix-power-down-latency.patch deleted file mode 100644 index ab5fe3f7e04..00000000000 --- a/queue-5.12/bus-mhi-core-fix-power-down-latency.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 44b1eba44dc537edf076f131f1eeee7544d0e04f Mon Sep 17 00:00:00 2001 -From: Loic Poulain -Date: Mon, 21 Jun 2021 21:46:10 +0530 -Subject: bus: mhi: core: Fix power down latency - -From: Loic Poulain - -commit 44b1eba44dc537edf076f131f1eeee7544d0e04f upstream. - -On graceful power-down/disable transition, when an MHI reset is -performed, the MHI device loses its context, including interrupt -configuration. However, the current implementation is waiting for -event(irq) driven state change to confirm reset has been completed, -which never happens, and causes reset timeout, leading to unexpected -high latency of the mhi_power_down procedure (up to 45 seconds). - -Fix that by moving to the recently introduced poll_reg_field method, -waiting for the reset bit to be cleared, in the same way as the -power_on procedure. - -Cc: stable@vger.kernel.org -Fixes: a6e2e3522f29 ("bus: mhi: core: Add support for PM state transitions") -Signed-off-by: Loic Poulain -Reviewed-by: Bhaumik Bhatt -Reviewed-by: Manivannan Sadhasivam -Reviewed-by: Hemant Kumar -Link: https://lore.kernel.org/r/1620029090-8975-1-git-send-email-loic.poulain@linaro.org -Signed-off-by: Manivannan Sadhasivam -Link: https://lore.kernel.org/r/20210621161616.77524-3-manivannan.sadhasivam@linaro.org -Signed-off-by: Greg Kroah-Hartman - ---- - drivers/bus/mhi/core/pm.c | 18 +++++------------- - 1 file changed, 5 insertions(+), 13 deletions(-) - ---- a/drivers/bus/mhi/core/pm.c -+++ b/drivers/bus/mhi/core/pm.c -@@ -467,23 +467,15 @@ static void mhi_pm_disable_transition(st - - /* Trigger MHI RESET so that the device will not access host memory */ - if (!MHI_PM_IN_FATAL_STATE(mhi_cntrl->pm_state)) { -- u32 in_reset = -1; -- unsigned long timeout = msecs_to_jiffies(mhi_cntrl->timeout_ms); -- - dev_dbg(dev, "Triggering MHI Reset in device\n"); - mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET); - - /* Wait for the reset bit to be cleared by the device */ -- ret = wait_event_timeout(mhi_cntrl->state_event, -- mhi_read_reg_field(mhi_cntrl, -- mhi_cntrl->regs, -- MHICTRL, -- MHICTRL_RESET_MASK, -- MHICTRL_RESET_SHIFT, -- &in_reset) || -- !in_reset, timeout); -- if (!ret || in_reset) -- dev_err(dev, "Device failed to exit MHI Reset state\n"); -+ ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL, -+ MHICTRL_RESET_MASK, MHICTRL_RESET_SHIFT, 0, -+ 25000); -+ if (ret) -+ dev_err(dev, "Device failed to clear MHI Reset\n"); - - /* - * Device will clear BHI_INTVEC as a part of RESET processing, diff --git a/queue-5.12/bus-mhi-wait-for-m2-state-during-system-resume.patch b/queue-5.12/bus-mhi-wait-for-m2-state-during-system-resume.patch index 30755966d3d..d6f8b79f046 100644 --- a/queue-5.12/bus-mhi-wait-for-m2-state-during-system-resume.patch +++ b/queue-5.12/bus-mhi-wait-for-m2-state-during-system-resume.patch @@ -61,7 +61,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/bus/mhi/core/pm.c +++ b/drivers/bus/mhi/core/pm.c -@@ -903,6 +903,7 @@ int mhi_pm_resume(struct mhi_controller +@@ -911,6 +911,7 @@ int mhi_pm_resume(struct mhi_controller ret = wait_event_timeout(mhi_cntrl->state_event, mhi_cntrl->dev_state == MHI_STATE_M0 || diff --git a/queue-5.12/series b/queue-5.12/series index a95f3ad2f0b..b2c0557b0de 100644 --- a/queue-5.12/series +++ b/queue-5.12/series @@ -63,7 +63,6 @@ mac80211-remove-iwlwifi-specific-workaround-that-broke-sta-ndp-tx.patch mac80211-fix-null-ptr-dereference-during-mesh-peer-connection-for-non-he-devices.patch sunrpc-fix-the-batch-tasks-count-wraparound.patch sunrpc-should-wake-up-the-privileged-task-firstly.patch -bus-mhi-core-fix-power-down-latency.patch bus-mhi-wait-for-m2-state-during-system-resume.patch bus-mhi-pci-generic-add-missing-pci_disable_pcie_error_reporting-calls.patch mm-gup-fix-try_grab_compound_head-race-with-split_huge_page.patch