]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
can: m_can: m_can_stop(): set device to software init mode before closing
authorFaiz Abbas <faiz_abbas@ti.com>
Tue, 25 Aug 2020 05:54:42 +0000 (11:24 +0530)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:24:19 +0000 (14:24 +0100)
commit4b068abc8761406d9803c17bd2d42d8f75e25781
tree067b1e8ff3937052fa490fab5992ab87ab1ffc8c
parent0d608ce825da66f8aa97fd5b3eff324f7e7ef340
can: m_can: m_can_stop(): set device to software init mode before closing

BugLink: https://bugs.launchpad.net/bugs/1908561
[ 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@ti.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200825055442.16994-1-faiz_abbas@ti.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
drivers/net/can/m_can/m_can.c