MLK-21597 can: flexcan: fix deadlock when can't call flexcan_noirq_resume()
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Mon, 29 Apr 2019 05:11:36 +0000 (13:11 +0800)
committerJoakim Zhang <qiangqing.zhang@nxp.com>
Tue, 30 Apr 2019 05:20:03 +0000 (13:20 +0800)
commit9fc3d3d6696903fdc3ddf3a0027afba453c0384b
tree624f6fcd85e277a1383b23e35f3317ad9697f698
parentbabe97e4370d26078bc3cc0f44835d9d24628d6f
MLK-21597 can: flexcan: fix deadlock when can't call flexcan_noirq_resume()

There is a limitation about wakeup event mechanisim in driver:

Other devices may suspend failed after system calling flexcan_suspend()
and before calling flexcan_noirq_suspend(), the result is that
flexcan_noirq_resume() will not be called. This will leave flexcan in
stop mode, and with the current driver it can't recover from this even
with a soft reboot, it requires a hard reboot.

This patch is intends to fix the scenario.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
drivers/net/can/flexcan.c