can: flexcan: fix stop mode acknowledgment
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Tue, 2 Jul 2019 01:45:41 +0000 (01:45 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 24 Jul 2019 09:16:31 +0000 (11:16 +0200)
commit5f186c257fa4808bb7f14e643b9fba3e11f08a30
tree1c668540712365184c460097fe612b1458a282a5
parente9f2a856e102fa27715b94bcc2240f686536d29b
can: flexcan: fix stop mode acknowledgment

To enter stop mode, the CPU should manually assert a global Stop Mode
request and check the acknowledgment asserted by FlexCAN. The CPU must
only consider the FlexCAN in stop mode when both request and
acknowledgment conditions are satisfied.

Fixes: de3578c198c6 ("can: flexcan: add self wakeup support")
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v5.0
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c