From patchwork Tue Oct 27 13:46:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 312847 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2ED5C5517A for ; Tue, 27 Oct 2020 14:48:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8379C22202 for ; Tue, 27 Oct 2020 14:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810105; bh=3XB9ugt7OyV653v7aSM2DpFppWYd501bNgytNPQxfII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2LVukFoGydtXZyzgjGCOtxgtbtuoQMEjUHfa3OqTEbI7EiqcvFmS7MY+wt1A4H/Jf BP32ti4AUn3ZRRQPKWFe60iSKxz9YrudLpcrEdqU9YwU506CG9iv/FOpgLQ4xDj/lA Gw2qWF8WAivfI4O2BZVo4DfZ/GY7nTUCVALfQkgw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1766358AbgJ0OsY (ORCPT ); Tue, 27 Oct 2020 10:48:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:48362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1766337AbgJ0OsS (ORCPT ); Tue, 27 Oct 2020 10:48:18 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5A1CF20709; Tue, 27 Oct 2020 14:48:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810097; bh=3XB9ugt7OyV653v7aSM2DpFppWYd501bNgytNPQxfII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=udb/yX+ZQWYyhGUr4UM/Gk5DDMZnJsVR8eGSIKoV+5CJh/763/ugm+HDgYtkrTCeE 0ktsjKH0pJ3OKgeJAKKgj0zZ+ZSAVqN4OU3VOOmi46lJaLevUn2Qh+oP33D3HBB9mc /IqkMAOzgEn+evIHcNFQB4lb/exM0hxTYFPFuiDM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lucas Stach , Dan Murphy , Marc Kleine-Budde Subject: [PATCH 5.8 020/633] can: m_can_platform: dont call m_can_class_suspend in runtime suspend Date: Tue, 27 Oct 2020 14:46:03 +0100 Message-Id: <20201027135523.633249200@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Lucas Stach [ Upstream commit 81f1f5ae8b3cbd54fdd994c9e9aacdb7b414a802 ] 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 Link: https://lore.kernel.org/r/20200811081545.19921-1-l.stach@pengutronix.de Acked-by: Dan Murphy Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/m_can/m_can_platform.c | 2 -- 1 file changed, 2 deletions(-) --- 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_ 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);