Patch "bus: mhi: core: Clear context for stopped channels from remove()" has been added to the 5.10-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: core: Clear context for stopped channels from remove()

to the 5.10-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-core-clear-context-for-stopped-channels-from.patch
and it can be found in the queue-5.10 subdirectory.

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



commit f0420f9c8763ff5f525eb5ce656e4180ae056c60
Author: Bhaumik Bhatt <bbhatt@xxxxxxxxxxxxxx>
Date:   Thu Apr 1 14:16:11 2021 -0700

    bus: mhi: core: Clear context for stopped channels from remove()
    
    [ Upstream commit 4e44ae3d6d9c2c2a6d9356dd279c925532d5cd8c ]
    
    If a channel was explicitly stopped but not reset and a driver
    remove is issued, clean up the channel context such that it is
    reflected on the device. This move is useful if a client driver
    module is unloaded or a device crash occurs with the host having
    placed the channel in a stopped state.
    
    Signed-off-by: Bhaumik Bhatt <bbhatt@xxxxxxxxxxxxxx>
    Reviewed-by: Hemant Kumar <hemantk@xxxxxxxxxxxxxx>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/1617311778-1254-3-git-send-email-bbhatt@xxxxxxxxxxxxxx
    Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
index 3422ea133deb..0d0386f67ffe 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -1280,7 +1280,8 @@ static int mhi_driver_remove(struct device *dev)
 
 		mutex_lock(&mhi_chan->mutex);
 
-		if (ch_state[dir] == MHI_CH_STATE_ENABLED &&
+		if ((ch_state[dir] == MHI_CH_STATE_ENABLED ||
+		     ch_state[dir] == MHI_CH_STATE_STOP) &&
 		    !mhi_chan->offload_ch)
 			mhi_deinit_chan_ctxt(mhi_cntrl, mhi_chan);
 



[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