Linux-Can Archive on lore.kernel.org
 help / color / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Dan Murphy <dmurphy@ti.com>,
	Sriram Dash <sriram.dash@samsung.com>,
	Wolfgang Grandegger <wg@grandegger.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org,
	Marek Vasut <marex@denx.de>,
	kernel@pengutronix.de, patchwork-lst@pengutronix.de
Subject: [PATCH] can: m_can_platform: don't call m_can_class_suspend in runtime suspend
Date: Tue, 11 Aug 2020 10:15:44 +0200
Message-ID: <20200811081545.19921-1-l.stach@pengutronix.de> (raw)

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


             reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-11  8:15 Lucas Stach [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200811081545.19921-1-l.stach@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=dmurphy@ti.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=patchwork-lst@pengutronix.de \
    --cc=sriram.dash@samsung.com \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Can Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-can/0 linux-can/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-can linux-can/ https://lore.kernel.org/linux-can \
		linux-can@vger.kernel.org
	public-inbox-index linux-can

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-can


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git