Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4BCAFEEB565 for ; Sat, 9 Sep 2023 00:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7KqMgVVFu7mmBEFIpa//0rUOu0Oa1TWl+A3FuBWF+GQ=; b=ItJrlXRlDAPmZi xwQPZj95HTg+0G+e7cMGJx/qxOGarz8xwr9+2QutAt5e6ifB5rEwisrsujtgIVtpCqkTcC0avrlFs Eog/uYrhZE36M5LokEWKI6Zew4TdTVVNB6zIClWILITdkFQM3woiKQMwYfDzw7VOKDME+Y/BRt/6G KTI5hLsNmCDbVxbDkrCLsqB9ZSgsy5aBgiUVWpYup2KWbGffHxystq2aYJcuoHkpUAsbIpr0rS4GV MBf4yfdlmEIyK7neYBh7HNp0sVUAAc+7tqlNrLxoZZ37ZhKzEI+AJci5DAsTvpZACifZd+kzGRZir oT3J16aLEjzX4aLEQmGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qelks-00EkXQ-0i; Sat, 09 Sep 2023 00:23:18 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qelkp-00EkVM-0X for linux-arm-kernel@lists.infradead.org; Sat, 09 Sep 2023 00:23:16 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C4308B82318; Sat, 9 Sep 2023 00:23:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9B3FC433B6; Sat, 9 Sep 2023 00:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694218993; bh=KFZsGGyD0P7y0oh9GMll0hj/TXO8KOZJBtkIG+3Tpb4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NAM0RA3bN9G7Ew/wLJ6AfDZTf9mWZ/NsKaJsVWEDSfNyo2Ax7igGgxu0cvwNpk9/W Sp0uoifNUlizM7CUpapDirrWoGNzJ5pWa5iKFdBxvJOu+dH7evqUusqvjhPiLR8OUf V0BLN+uAxpl8upvFVMUvD6nKG/q+/T2CHqN0qpr2JldgGpPNpCP4FgzYH9zHgWW/Ys WOpVzurF1AhyDH6zQnMXzEYxpTL5U7Rqc0ZXLW9g3t0TDsBWs79W2ykfzP6ns4GNir ic21tSuXR/M8SSLGMO4gTZ0/NNJ0ntjpGdSlS4yAqv2g8DKTI27SPf87NOjXd2rIz+ hrMDyPTnTHGbw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mark Brown , Fabio Estevam , Lorenzo Pieralisi , Richard Zhu , Manivannan Sadhasivam , Sasha Levin , l.stach@pengutronix.de, kw@linux.com, bhelgaas@google.com, shawnguo@kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 6.1 4/9] PCI: dwc: Provide deinit callback for i.MX Date: Fri, 8 Sep 2023 20:22:55 -0400 Message-Id: <20230909002302.3578361-4-sashal@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230909002302.3578361-1-sashal@kernel.org> References: <20230909002302.3578361-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230908_172315_349458_576B8341 X-CRM114-Status: GOOD ( 12.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mark Brown [ Upstream commit fc8b24c28bec19fc0621d108b9ee81ddfdedb25a ] The i.MX integration for the DesignWare PCI controller has a _host_exit() operation which undoes everything that the _host_init() operation does but does not wire this up as the host_deinit callback for the core, or call it in any path other than suspend. This means that if we ever unwind the initial probe of the device, for example because it fails, the regulator core complains that the regulators for the device were left enabled: imx6q-pcie 33800000.pcie: iATU: unroll T, 4 ob, 4 ib, align 64K, limit 16G imx6q-pcie 33800000.pcie: Phy link never came up imx6q-pcie 33800000.pcie: Phy link never came up imx6q-pcie: probe of 33800000.pcie failed with error -110 ------------[ cut here ]------------ WARNING: CPU: 2 PID: 46 at drivers/regulator/core.c:2396 _regulator_put+0x110/0x128 Wire up the callback so that the core can clean up after itself. Link: https://lore.kernel.org/r/20230731-pci-imx-regulator-cleanup-v2-1-fc8fa5c9893d@kernel.org Tested-by: Fabio Estevam Signed-off-by: Mark Brown Signed-off-by: Lorenzo Pieralisi Reviewed-by: Richard Zhu Acked-by: Manivannan Sadhasivam Signed-off-by: Sasha Levin --- drivers/pci/controller/dwc/pci-imx6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 47db2d20568ef..388354a8e31cf 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -999,6 +999,7 @@ static void imx6_pcie_host_exit(struct dw_pcie_rp *pp) static const struct dw_pcie_host_ops imx6_pcie_host_ops = { .host_init = imx6_pcie_host_init, + .host_deinit = imx6_pcie_host_exit, }; static const struct dw_pcie_ops dw_pcie_ops = { -- 2.40.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel