* [PATCH] can: m_can_platform: don't call m_can_class_suspend in runtime suspend
@ 2020-08-11 8:15 Lucas Stach
2020-08-11 8:15 ` Lucas Stach
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2020-08-11 8:15 UTC (permalink / raw)
To: Dan Murphy, Sriram Dash, Wolfgang Grandegger, Marc Kleine-Budde
Cc: linux-can, netdev, Marek Vasut, kernel, patchwork-lst
0704c5743694 (can: m_can_platform: remove unnecessary m_can_class_resume()
call) removed the m_can_class_resume() call in the runtime resume path
to get rid of a infinite recursion, so the runtime resume now only handles
the device clocks. Unfortunately it did not remove the complementary
m_can_class_suspend() call in the runtime suspend function, so those paths
are now unbalanced, which causes the pinctrl state to get stuck on the
"sleep" state, which breaks all CAN functionality on SoCs where this state
is defined. Remove the m_can_class_suspend() call to fix this.
Fixes: 0704c5743694 (can: m_can_platform: remove unnecessary
m_can_class_resume() call)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/net/can/m_can/m_can_platform.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c
index 38ea5e600fb8..e6d0cb9ee02f 100644
--- a/drivers/net/can/m_can/m_can_platform.c
+++ b/drivers/net/can/m_can/m_can_platform.c
@@ -144,8 +144,6 @@ static int __maybe_unused m_can_runtime_suspend(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct m_can_classdev *mcan_class = netdev_priv(ndev);
- m_can_class_suspend(dev);
-
clk_disable_unprepare(mcan_class->cclk);
clk_disable_unprepare(mcan_class->hclk);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] can: m_can_platform: don't call m_can_class_suspend in runtime suspend
2020-08-11 8:15 [PATCH] can: m_can_platform: don't call m_can_class_suspend in runtime suspend Lucas Stach
@ 2020-08-11 8:15 ` Lucas Stach
2020-09-01 18:20 ` Dan Murphy
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2020-08-11 8:15 UTC (permalink / raw)
To: Dan Murphy, Sriram Dash, Wolfgang Grandegger, Marc Kleine-Budde
Cc: linux-can, netdev, Marek Vasut, kernel, patchwork-lst
0704c5743694 (can: m_can_platform: remove unnecessary m_can_class_resume()
call) removed the m_can_class_resume() call in the runtime resume path
to get rid of a infinite recursion, so the runtime resume now only handles
the device clocks. Unfortunately it did not remove the complementary
m_can_class_suspend() call in the runtime suspend function, so those paths
are now unbalanced, which causes the pinctrl state to get stuck on the
"sleep" state, which breaks all CAN functionality on SoCs where this state
is defined. Remove the m_can_class_suspend() call to fix this.
Fixes: 0704c5743694 (can: m_can_platform: remove unnecessary
m_can_class_resume() call)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/net/can/m_can/m_can_platform.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c
index 38ea5e600fb8..e6d0cb9ee02f 100644
--- a/drivers/net/can/m_can/m_can_platform.c
+++ b/drivers/net/can/m_can/m_can_platform.c
@@ -144,8 +144,6 @@ static int __maybe_unused m_can_runtime_suspend(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct m_can_classdev *mcan_class = netdev_priv(ndev);
- m_can_class_suspend(dev);
-
clk_disable_unprepare(mcan_class->cclk);
clk_disable_unprepare(mcan_class->hclk);
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] can: m_can_platform: don't call m_can_class_suspend in runtime suspend
2020-08-11 8:15 ` Lucas Stach
@ 2020-09-01 18:20 ` Dan Murphy
0 siblings, 0 replies; 4+ messages in thread
From: Dan Murphy @ 2020-09-01 18:20 UTC (permalink / raw)
To: Lucas Stach, Sriram Dash, Wolfgang Grandegger, Marc Kleine-Budde
Cc: linux-can, netdev, Marek Vasut, kernel, patchwork-lst
Lucase
On 8/11/20 3:15 AM, Lucas Stach wrote:
> 0704c5743694 (can: m_can_platform: remove unnecessary m_can_class_resume()
> call) removed the m_can_class_resume() call in the runtime resume path
> to get rid of a infinite recursion, so the runtime resume now only handles
> the device clocks. Unfortunately it did not remove the complementary
> m_can_class_suspend() call in the runtime suspend function, so those paths
> are now unbalanced, which causes the pinctrl state to get stuck on the
> "sleep" state, which breaks all CAN functionality on SoCs where this state
> is defined. Remove the m_can_class_suspend() call to fix this.
>
> Fixes: 0704c5743694 (can: m_can_platform: remove unnecessary
> m_can_class_resume() call)
Not sure about this wrap around for the fixes in the commit msg.
Otherwise
Acked-by: Dan Murphy <dmurphy@ti.com>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/net/can/m_can/m_can_platform.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c
> index 38ea5e600fb8..e6d0cb9ee02f 100644
> --- a/drivers/net/can/m_can/m_can_platform.c
> +++ b/drivers/net/can/m_can/m_can_platform.c
> @@ -144,8 +144,6 @@ static int __maybe_unused m_can_runtime_suspend(struct device *dev)
> struct net_device *ndev = dev_get_drvdata(dev);
> struct m_can_classdev *mcan_class = netdev_priv(ndev);
>
> - m_can_class_suspend(dev);
> -
> clk_disable_unprepare(mcan_class->cclk);
> clk_disable_unprepare(mcan_class->hclk);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] can: m_can_platform: don't call m_can_class_suspend in runtime suspend
2020-10-06 21:37 pull-request: can 2020-10-06 Marc Kleine-Budde
@ 2020-10-06 21:37 ` Marc Kleine-Budde
0 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2020-10-06 21:37 UTC (permalink / raw)
To: netdev
Cc: davem, linux-can, kernel, Lucas Stach, Dan Murphy, Marc Kleine-Budde
From: Lucas Stach <l.stach@pengutronix.de>
0704c5743694 can: m_can_platform: remove unnecessary m_can_class_resume() call
removed the m_can_class_resume() call in the runtime resume path to get
rid of a infinite recursion, so the runtime resume now only handles the device
clocks.
Unfortunately it did not remove the complementary m_can_class_suspend() call in
the runtime suspend function, so those paths are now unbalanced, which causes
the pinctrl state to get stuck on the "sleep" state, which breaks all CAN
functionality on SoCs where this state is defined. Remove the
m_can_class_suspend() call to fix this.
Fixes: 0704c5743694 can: m_can_platform: remove unnecessary m_can_class_resume() call
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Link: https://lore.kernel.org/r/20200811081545.19921-1-l.stach@pengutronix.de
Acked-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/m_can/m_can_platform.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/can/m_can/m_can_platform.c b/drivers/net/can/m_can/m_can_platform.c
index 38ea5e600fb8..e6d0cb9ee02f 100644
--- a/drivers/net/can/m_can/m_can_platform.c
+++ b/drivers/net/can/m_can/m_can_platform.c
@@ -144,8 +144,6 @@ static int __maybe_unused m_can_runtime_suspend(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct m_can_classdev *mcan_class = netdev_priv(ndev);
- m_can_class_suspend(dev);
-
clk_disable_unprepare(mcan_class->cclk);
clk_disable_unprepare(mcan_class->hclk);
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-06 21:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 8:15 [PATCH] can: m_can_platform: don't call m_can_class_suspend in runtime suspend Lucas Stach
2020-08-11 8:15 ` Lucas Stach
2020-09-01 18:20 ` Dan Murphy
2020-10-06 21:37 pull-request: can 2020-10-06 Marc Kleine-Budde
2020-10-06 21:37 ` [PATCH] can: m_can_platform: don't call m_can_class_suspend in runtime suspend Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).