]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
can: flexcan: fix resume function
authorFabio Estevam <fabio.estevam@nxp.com>
Wed, 17 Aug 2016 15:41:08 +0000 (12:41 -0300)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 20 Oct 2016 13:06:21 +0000 (08:06 -0500)
commit253e9672cc4b8f79922971354d624f2e81be4a00
tree40140b304335b1b877a0643db46d24c2afe122fe
parent171adfa99d68f93c5283052a98e6c92232c8183a
can: flexcan: fix resume function

BugLink: http://bugs.launchpad.net/bugs/1629386
commit 4de349e786a3a2d51bd02d56f3de151bbc3c3df9 upstream.

On a imx6ul-pico board the following error is seen during system suspend:

dpm_run_callback(): platform_pm_resume+0x0/0x54 returns -110
PM: Device 2090000.flexcan failed to resume: error -110

The reason for this suspend error is because when the CAN interface is not
active the clocks are disabled and then flexcan_chip_enable() will
always fail due to a timeout error.

In order to fix this issue, only call flexcan_chip_enable/disable()
when the CAN interface is active.

Based on a patch from Dong Aisheng in the NXP kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/can/flexcan.c