Commit d757218
can: m_can: m_can_close(): stop clocks after device has been shut down
[ Upstream commit 2c09b50 ]
After calling m_can_stop() an interrupt may be pending or NAPI might
still be executed. This means the driver might still touch registers
of the IP core after the clocks have been disabled. This is not good
practice and might lead to aborts depending on the SoC integration.
To avoid these potential problems, make m_can_close() symmetric to
m_can_open(), i.e. stop the clocks at the end, right before shutting
down the transceiver.
Fixes: e0d1f48 ("can: m_can: add Bosch M_CAN controller support")
Link: https://patch.msgid.link/20240910-can-m_can-fix-ifup-v3-2-6c1720ba45ce@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 7fb4f56 commit d757218
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
1603 | | - | |
1604 | 1603 | | |
1605 | 1604 | | |
1606 | 1605 | | |
| |||
1614 | 1613 | | |
1615 | 1614 | | |
1616 | 1615 | | |
| 1616 | + | |
1617 | 1617 | | |
1618 | 1618 | | |
1619 | 1619 | | |
| |||
0 commit comments