Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10914296rwl; Mon, 2 Jan 2023 10:13:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXsPfwSC0Qhr8pw7/+I/+SEjWbCLF2Mi80pMjEG8fLEI3WgjsFcijVISIe6QCqGZpr2/HXU1 X-Received: by 2002:a17:902:8213:b0:192:6bb1:ed5a with SMTP id x19-20020a170902821300b001926bb1ed5amr34433676pln.38.1672683185646; Mon, 02 Jan 2023 10:13:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672683185; cv=none; d=google.com; s=arc-20160816; b=lklZHPeIMZ3LunyU2B/rHQxRePAdG8X4BBwZVVRlAI0u1Fo2Xx1WFLCoTW9auwVezv OUAUFVgqbiMk45YQRK3ZzcSYzo546gk7CU6gfA50hjdEM/Jw1EPbpUhpC5/jpftF0k+1 4EA3GU7LkvR7fM0R/KcbVV65tlwhX00A+Pl6+oiAA5BtdmyvpH7wrxfA/OFRPS+Gh603 T7M55L1yF3URnktc3eVoTwrF/MlGa3OgDzU3QoACcW8XyslPhyCrTyP/MJ3OyCl6nJvJ 9IK8XMTsEimz/hOebRahWHbXHNA5f8SME3ILVS9g/cx+N65+HPP+DUXqIOIqeFuGtO3d O9kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qzQEFykzgBVCtIGI+Tm0wjnd027yWKu58ozHqydCFME=; b=XXWsOZaYIdAHcIX7ShZjuMlTg3T1gqq2TYQOepMIxb2nTh0n+SiCjUxVeE5TM4KL2b OP5shPw8WEePqQ40HT0ojIJzKxF85/xcd2KD5po+nDbZY77/nlFshAUie2li9u5J2PNx Gx5wGecIATo49Z1aNg9OIWX7BmDg4nOKx+iKTrLPfmaSFhSksFDDElfEX+uW12n7ACIi mA7IYmWN78fZvkzpmlch124D3OWlqll29qKZ+kZiTqdBUnY1gwRmujUsICFVKiakyCSH MRStcdqz8xj6DtHEp/Du0+2capwTeXCNV0btIQP3pBEqHa614uYVjvONMYpMlnqYH4lU lerw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=luxdFTD+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f15-20020a63754f000000b00476cb3a08fcsi30802077pgn.338.2023.01.02.10.12.58; Mon, 02 Jan 2023 10:13:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=luxdFTD+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234698AbjABRn0 (ORCPT + 62 others); Mon, 2 Jan 2023 12:43:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230120AbjABRnY (ORCPT ); Mon, 2 Jan 2023 12:43:24 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64CFEA187; Mon, 2 Jan 2023 09:43:23 -0800 (PST) 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 21F86B80D09; Mon, 2 Jan 2023 17:43:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32CFCC433EF; Mon, 2 Jan 2023 17:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672681400; bh=eeGID9WmDRN6FuuErqklRn+h70OeSzjZBAKTjhskM+o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=luxdFTD+QXYVTSa7Nduryhj6TpxluC4iF/W9vgyottAV562iYTJTOkLeL+Pt0hWhC jLULQzDynK9ABKhZjLXajlqGpCzKq412I9cdY5vCmOfxJ+TTJylPS6xvHPuLLTyKPy NXvXIrg9XtA/rKf6AmFoVNNmJAns6no8UjmeV0D0unDpqkxatQ8LgwDiVdbPTv0K+W 9bRTATKLTgpNcIeXPoXVrH7jdAU9sH/7Y0nhTgYqbqgZytbCaa1CQFcC11OYdCbeTg +Xul8nMEeHAPmdGPeLY7U/y9pixCBG4Sbc7oI8qlDUJGwK4uGtrLjGwEN2L0IpNuus /Gv0759iieMLw== Date: Mon, 2 Jan 2023 23:13:13 +0530 From: Manivannan Sadhasivam To: Johan Hovold Cc: Stanimir Varbanov , Lorenzo Pieralisi , Andy Gross , Bjorn Andersson , Konrad Dybcio , Bjorn Helgaas , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] PCI: qcom: Fix host-init error handling Message-ID: <20230102174313.GC16638@thinkpad> References: <20221017114705.8277-1-johan+linaro@kernel.org> <20221017114705.8277-2-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221017114705.8277-2-johan+linaro@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 17, 2022 at 01:47:04PM +0200, Johan Hovold wrote: > Implement the new host_deinit() callback so that the PHY is powered off > and regulators and clocks are disabled also on late host-init errors. > > Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") > Signed-off-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam Thanks, Mani > --- > drivers/pci/controller/dwc/pcie-qcom.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index 0c13f976626f..417be4d225ed 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom.c > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > @@ -1534,8 +1534,19 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp) > return ret; > } > > +static void qcom_pcie_host_deinit(struct dw_pcie_rp *pp) > +{ > + struct dw_pcie *pci = to_dw_pcie_from_pp(pp); > + struct qcom_pcie *pcie = to_qcom_pcie(pci); > + > + qcom_ep_reset_assert(pcie); > + phy_power_off(pcie->phy); > + pcie->cfg->ops->deinit(pcie); > +} > + > static const struct dw_pcie_host_ops qcom_pcie_dw_ops = { > - .host_init = qcom_pcie_host_init, > + .host_init = qcom_pcie_host_init, > + .host_deinit = qcom_pcie_host_deinit, > }; > > /* Qcom IP rev.: 2.1.0 Synopsys IP rev.: 4.01a */ > -- > 2.37.3 > -- மணிவண்ணன் சதாசிவம்