Repository navigation
UPSTREAM: scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on - #1611
Closed
ggiriprasad wants to merge 1 commit into
Closed
ggiriprasad wants to merge 1 commit into
ggiriprasad wants to merge 1 commit into
Conversation
…are on ufshcd_setup_clocks() applied the PM QoS vote only when clock scaling was not supported, relying on ufshcd_scale_clks() otherwise. But that only updates the vote while scaling up or down, and a scale-down drops it while the clocks stay on. The CPUs can then enter deep idle while a request (e.g. a Query request) is still outstanding, delaying the completion interrupt and causing command timeouts. Apply the vote in ufshcd_setup_clocks() unconditionally and drop the ufshcd_pm_qos_update() call from ufshcd_scale_clks(), so the vote tracks only the clock on/off state: held whenever the clocks are on, released when they are gated off. Fixes: 2777e73 ("scsi: ufs: core: Add CPU latency QoS support for UFS driver") Link: https://lore.kernel.org/all/20261202104637.1339868-2-manish.pandey@oss.qualcomm.com/ Signed-off-by: Manish Pandey <manish.pandey@oss.qualcomm.com> Signed-off-by: Giri Prasad Goriparthi <giri.goriparthi@oss.qualcomm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ufshcd_setup_clocks() applied the PM QoS vote only when clock scaling
was not supported, relying on ufshcd_scale_clks() otherwise. Since that
path only updates the vote while scaling up or down, and devfreq scaling
never toggles the clocks, a scale-down drops the vote while the clocks
stay on. The vote is not reference counted and nothing restores it, so
the CPUs can enter deep idle while a request (e.g. a Query request) is
still outstanding, which delays the completion interrupt and can lead to
command timeouts.
Apply the vote in ufshcd_setup_clocks() unconditionally and drop the
ufshcd_pm_qos_update() call from ufshcd_scale_clks(), so the vote
tracks only the clock on/off state: held whenever the clocks are on,
released when they are gated off.
Maili MTP ABL-ESP Boot crash fix.
Link: https://lore.kernel.org/all/20261202104637.1339868-2-manish.pandey@oss.qualcomm.com/
Upstream: https://lore.kernel.org/all/sashiko-outbox-245551@kernel.org/