Patch "bus: mhi: ep: Save channel state locally during suspend and resume" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bus: mhi: ep: Save channel state locally during suspend and resume

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bus-mhi-ep-save-channel-state-locally-during-suspend-and-resume.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 8a1c24bb908f9ecbc4be0fea014df67d43161551 Mon Sep 17 00:00:00 2001
From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
Date: Wed, 28 Dec 2022 21:47:04 +0530
Subject: bus: mhi: ep: Save channel state locally during suspend and resume

From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>

commit 8a1c24bb908f9ecbc4be0fea014df67d43161551 upstream.

During suspend and resume, the channel state needs to be saved locally.
Otherwise, the endpoint may access the channels while they were being
suspended and causing access violations.

Fix it by saving the channel state locally during suspend and resume.

Cc: <stable@xxxxxxxxxxxxxxx> # 5.19
Fixes: e4b7b5f0f30a ("bus: mhi: ep: Add support for suspending and resuming channels")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
Reviewed-by: Jeffrey Hugo <quic_jhugo@xxxxxxxxxxx)
Link: https://lore.kernel.org/r/20221228161704.255268-7-manivannan.sadhasivam@xxxxxxxxxx
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/bus/mhi/ep/main.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/bus/mhi/ep/main.c
+++ b/drivers/bus/mhi/ep/main.c
@@ -1136,6 +1136,7 @@ void mhi_ep_suspend_channels(struct mhi_
 
 		dev_dbg(&mhi_chan->mhi_dev->dev, "Suspending channel\n");
 		/* Set channel state to SUSPENDED */
+		mhi_chan->state = MHI_CH_STATE_SUSPENDED;
 		tmp &= ~CHAN_CTX_CHSTATE_MASK;
 		tmp |= FIELD_PREP(CHAN_CTX_CHSTATE_MASK, MHI_CH_STATE_SUSPENDED);
 		mhi_cntrl->ch_ctx_cache[i].chcfg = cpu_to_le32(tmp);
@@ -1165,6 +1166,7 @@ void mhi_ep_resume_channels(struct mhi_e
 
 		dev_dbg(&mhi_chan->mhi_dev->dev, "Resuming channel\n");
 		/* Set channel state to RUNNING */
+		mhi_chan->state = MHI_CH_STATE_RUNNING;
 		tmp &= ~CHAN_CTX_CHSTATE_MASK;
 		tmp |= FIELD_PREP(CHAN_CTX_CHSTATE_MASK, MHI_CH_STATE_RUNNING);
 		mhi_cntrl->ch_ctx_cache[i].chcfg = cpu_to_le32(tmp);


Patches currently in stable-queue which might be from manivannan.sadhasivam@xxxxxxxxxx are

queue-6.1/bus-mhi-ep-save-channel-state-locally-during-suspend-and-resume.patch
queue-6.1/remoteproc-qcom_q6v5_mss-use-a-carveout-to-authentic.patch
queue-6.1/arm-dts-qcom-sdx55-add-qcom-smmu-500-as-the-fallback-for-iommu-node.patch
queue-6.1/bus-mhi-ep-move-chan-lock-to-the-start-of-processing-queued-ch-ring.patch
queue-6.1/bus-mhi-ep-only-send-enotconn-status-if-client-driver-is-available.patch
queue-6.1/revert-remoteproc-qcom_q6v5_mss-map-unmap-metadata-r.patch
queue-6.1/dmaengine-dw-edma-fix-missing-src-dst-address-of-int.patch
queue-6.1/arm-dts-qcom-sdx65-add-qcom-smmu-500-as-the-fallback-for-iommu-node.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux