From mboxrd@z Thu Jan 1 00:00:00 1970 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 506F2C433EF for ; Wed, 23 Feb 2022 17:51:03 +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:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=Jc2Kbnye8LrKLuY8J4r3kw1lZ47EE4jFW/3aYzuP2a0=; b=BdOOfurYQyb9/n JYlyTAEYdoKCqrgagzYBkNIzdG30Zb8M3UTNL8nvvcR6uaOIxn/88yg3naYfySItsL4c4Qvbn3Y/7 XRv/ZEoiKoD1geo/BUx8fxpHMdQjVzAy4rUipIxSjqbRHspqepnpkyW+ebuQia3+/drX3kc59q1Ux W+b8GhypKh8oimm2swENlYAmfrjebxkRfA4Z2ZxXEPEYWvpnyzQ4Blq5bFJdKgqU5JzTbmOUXxJNg raZ4pF4hm7RoQwChtKrpi+8t173lFsmpP7tceUZoSMb8PHprMLib1Z8QERL3Ta70XnnnFh0p6H0u7 ULX9/dexAh5YTv7QfvvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMvlv-00FZys-7I; Wed, 23 Feb 2022 17:49:51 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMvlo-00FZxK-Lh for linux-arm-kernel@lists.infradead.org; Wed, 23 Feb 2022 17:49:46 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 15C13B82126; Wed, 23 Feb 2022 17:49:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78A07C340E7; Wed, 23 Feb 2022 17:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645638581; bh=H8P7Ks4m+SZ3IXEDDRjp8V4gV6GaxlZWg9rscesZaI0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=OUI9vbYbdyvJYhQd9X5itZVtsvizQ8HCbWnRE7l/48uRx0ClJ28gpnVDn/7OfLLtJ sQ7s0uduwdSsijrECv3qc6EAS/cBxVD1k29vcTRJD0gBBYF2KqJqQY1nZr4anGAAEf PVfLIoPAMEkjXTPmMGLFjwljNowy4li/zNGEZVs+xik6v2MTvmCsVip0ioefTQ7ysb EMZGBfK1xUxCHWMyapKICQfXHXgFP2ULHYv/QoKIAda4UQRj5Dy8zvIGEtyc5dwIm6 Io51SayGo94VxxSMNuQbOCcy/OQqjQ1sIYR1MzMD8SA2zrT3pAIRLhV6H9cqKWWF9S xCXayvRpu8BRg== Date: Wed, 23 Feb 2022 11:49:40 -0600 From: Bjorn Helgaas To: Richard Zhu Cc: l.stach@pengutronix.de, bhelgaas@google.com, broonie@kernel.org, lorenzo.pieralisi@arm.com, jingoohan1@gmail.com, festevam@gmail.com, francesco.dolcini@toradex.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: Re: [PATCH v7 6/8] PCI: dwc: Add dw_pcie_host_ops.host_exit() callback Message-ID: <20220223174940.GA140379@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1644992463-14467-7-git-send-email-hongxing.zhu@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220223_094944_910116_43D5B7F6 X-CRM114-Status: GOOD ( 12.19 ) 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 On Wed, Feb 16, 2022 at 02:21:01PM +0800, Richard Zhu wrote: > When link is never came up in the link training after host_init. > The clocks and power supplies usage counter balance should be handled > properly on some DWC platforms (for example, i.MX PCIe). > > Add a new host_exit() callback into dw_pcie_host_ops, then it could be > invoked to handle the unbalance issue in the error handling after > host_init() function when link is down. Possible rewording, not sure if it captures everything you want: When the link never comes up after ->host_init(), some drivers, especially those that don't support hotplug, want to turn off clocks and power supplies. Add a new ->host_exit() callback in dw_pcie_host_ops so these drivers can clean up if ->host_init() fails. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel