]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
MLK-10211 can: flexcan: fix resume failed issue
authorDong Aisheng <b29396@freescale.com>
Wed, 11 Feb 2015 07:12:44 +0000 (15:12 +0800)
committerDong Aisheng <b29396@freescale.com>
Fri, 6 Mar 2015 03:00:20 +0000 (11:00 +0800)
commit34b7539ee70453e1fe18f723b24520c1e5121e00
tree8e315675929fe1694dabaaf52dfe6036c72e719d
parentf6ab40182ff07ecd8e9b2662b4efee0797d7d48d
MLK-10211 can: flexcan: fix resume failed issue

We can observe the following error during system resume.
dpm_run_callback(): platform_pm_resume+0x0/0x4c returns -110
PM: Device 2090000.can failed to resume: error -110

It is caused by the flexcan is in disable state and the clock is disabled
by default while the CAN is not up. During resume, the calling of
flexcan_chip_enable will obviously fail due to no clock.

The issue only happened when CAN device is not up. If CAN is up, clock is there
and no issue will happen.

Because the CAN is always in disabled state by default if it's not up.
We don't have to disable it again during suspend and enable it after resume.
This patch simply the suspend/resume to only enter/exit disabled mode if CAN
is up.

Signed-off-by: Dong Aisheng <b29396@freescale.com>
(cherry picked from commit 1a8a68cb11ce2de085efb05aa0262a7eca07aba6)
drivers/net/can/flexcan.c