]> git.baikalelectronics.ru Git - 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)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 15 Nov 2020 17:33:45 +0000 (18:33 +0100)
commit156adb7aaee77e126ff88998dd9e6a3d998962f5
treeff41ec60be84689af4f6623e815f73385c83bc44
parent13034f6226a3e7bb0abdae3eea8da5ccdfcd071d
can: m_can: m_can_stop(): set device to software init mode before closing

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: 366ec73cfaf2 ("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>
drivers/net/can/m_can/m_can.c