Patch "can: m_can: m_can_stop(): set device to software init mode before closing" has been added to the 5.9-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

    can: m_can: m_can_stop(): set device to software init mode before closing

to the 5.9-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:
     can-m_can-m_can_stop-set-device-to-software-init-mod.patch
and it can be found in the queue-5.9 subdirectory.

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



commit f197875fbe528311cd6d1ada635600d66038c00c
Author: Faiz Abbas <faiz_abbas@xxxxxx>
Date:   Tue Aug 25 11:24:42 2020 +0530

    can: m_can: m_can_stop(): set device to software init mode before closing
    
    [ Upstream commit a584e9bc1b7e88f24f8504886eafbe6c73d8a97c ]
    
    There might be some requests pending in the buffer when the interface close
    sequence occurs. In some devices, these pending requests might lead to the
    module not shutting down properly when m_can_clk_stop() is called.
    
    Therefore, move the device to init state before potentially powering it down.
    
    Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support")
    Signed-off-by: Faiz Abbas <faiz_abbas@xxxxxx>
    Acked-by: Dan Murphy <dmurphy@xxxxxx>
    Link: https://lore.kernel.org/r/20200825055442.16994-1-faiz_abbas@xxxxxx
    Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 645101d19989b..e7264043f79a2 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1414,6 +1414,9 @@ static void m_can_stop(struct net_device *dev)
 	/* disable all interrupts */
 	m_can_disable_all_interrupts(cdev);
 
+	/* Set init mode to disengage from the network */
+	m_can_config_endisable(cdev, true);
+
 	/* set the state as STOPPED */
 	cdev->can.state = CAN_STATE_STOPPED;
 }



[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