* pull-request: can 2016-09-19
@ 2016-09-19 14:19 Marc Kleine-Budde
2016-09-19 14:19 ` [PATCH] can: flexcan: fix resume function Marc Kleine-Budde
2016-09-21 2:48 ` pull-request: can 2016-09-19 David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2016-09-19 14:19 UTC (permalink / raw)
To: netdev; +Cc: davem, linux-can, kernel
Hello David,
this is a pull request of one patch for the upcoming linux-4.8 release.
The patch by Fabio Estevam fixes the pm handling in the flexcan driver.
regards,
Marc
---
The following changes since commit 7ac327318e09a53e3df431dfd3f664dac7aba4df:
Merge tag 'mac80211-for-davem-2016-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 (2016-09-18 22:26:49 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git tags/linux-can-fixes-for-4.8-20160919
for you to fetch changes up to 4de349e786a3a2d51bd02d56f3de151bbc3c3df9:
can: flexcan: fix resume function (2016-09-19 16:09:05 +0200)
----------------------------------------------------------------
linux-can-fixes-for-4.8-20160919
----------------------------------------------------------------
Fabio Estevam (1):
can: flexcan: fix resume function
drivers/net/can/flexcan.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] can: flexcan: fix resume function
2016-09-19 14:19 pull-request: can 2016-09-19 Marc Kleine-Budde
@ 2016-09-19 14:19 ` Marc Kleine-Budde
2016-09-21 2:48 ` pull-request: can 2016-09-19 David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2016-09-19 14:19 UTC (permalink / raw)
To: netdev
Cc: davem, linux-can, kernel, Fabio Estevam, linux-stable, Marc Kleine-Budde
From: Fabio Estevam <fabio.estevam@nxp.com>
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>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/flexcan.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 41c0fc9f3b14..16f7cadda5c3 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1268,11 +1268,10 @@ static int __maybe_unused flexcan_suspend(struct device *device)
struct flexcan_priv *priv = netdev_priv(dev);
int err;
- err = flexcan_chip_disable(priv);
- if (err)
- return err;
-
if (netif_running(dev)) {
+ err = flexcan_chip_disable(priv);
+ if (err)
+ return err;
netif_stop_queue(dev);
netif_device_detach(dev);
}
@@ -1285,13 +1284,17 @@ static int __maybe_unused flexcan_resume(struct device *device)
{
struct net_device *dev = dev_get_drvdata(device);
struct flexcan_priv *priv = netdev_priv(dev);
+ int err;
priv->can.state = CAN_STATE_ERROR_ACTIVE;
if (netif_running(dev)) {
netif_device_attach(dev);
netif_start_queue(dev);
+ err = flexcan_chip_enable(priv);
+ if (err)
+ return err;
}
- return flexcan_chip_enable(priv);
+ return 0;
}
static SIMPLE_DEV_PM_OPS(flexcan_pm_ops, flexcan_suspend, flexcan_resume);
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: pull-request: can 2016-09-19
2016-09-19 14:19 pull-request: can 2016-09-19 Marc Kleine-Budde
2016-09-19 14:19 ` [PATCH] can: flexcan: fix resume function Marc Kleine-Budde
@ 2016-09-21 2:48 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-09-21 2:48 UTC (permalink / raw)
To: mkl; +Cc: netdev, linux-can, kernel
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Mon, 19 Sep 2016 16:19:48 +0200
> this is a pull request of one patch for the upcoming linux-4.8 release.
>
> The patch by Fabio Estevam fixes the pm handling in the flexcan driver.
Pulled, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-21 2:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 14:19 pull-request: can 2016-09-19 Marc Kleine-Budde
2016-09-19 14:19 ` [PATCH] can: flexcan: fix resume function Marc Kleine-Budde
2016-09-21 2:48 ` pull-request: can 2016-09-19 David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.