Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2107628rbb; Tue, 27 Feb 2024 10:48:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXB9Q5pIg2nW1miQUdORId2IRfU/SuSdDnuMcNBe8Va5uhUhUCRf3MtpuAsjh6RmyIxqwmvawJKFUvAVaV7cU+swL79x81UF+BU3AjlQw== X-Google-Smtp-Source: AGHT+IGOjr2mVPdEtLXZCu05j3gAcHbg2DDTBkD2KuuPIupA90cUxDO6hHL0mGoBZa2xlr7Dc2S3 X-Received: by 2002:a05:6358:761d:b0:17b:5c65:7f99 with SMTP id r29-20020a056358761d00b0017b5c657f99mr14118750rwg.1.1709059699368; Tue, 27 Feb 2024 10:48:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709059699; cv=pass; d=google.com; s=arc-20160816; b=bLr2yc5y7irJJViWpRozhzmebcmLJ060NP+fJrYmy8Gdw3ihscCec3Zpw3gwCy7KBr 8hQpBhXhsf3ZtD1FWJrU3nch6Iqil4lx7v8GGmZve6m/s96jj+72TXsr9I2lorhtAXE5 Kx6u0t7Zh53dprDYguUNe5GVdJGQR6SMbtMQQTfJlhJA2ZvOUAvirFcl/wVIBP4v+I6f Zw0V3g/wHolBJli2bg0fGmb8jfHMCL4vmSIi8j7DYjzj5SukwzBJYjeXjH+d97GEaH1f 2oS1tHipVRdxUx5BKCR42etDQ3cKaoeTemGsw35GFR0dx0owsiH5U15IgBwVNg1dpmG/ zMOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q8ShmjsBfirtuVXn7YN7NE2+9S2ssUe4qcNu7gqy8zk=; fh=DCNoqBHYqgejZyAcW1KPno3hOWFOfzcFIRpVzpthhSg=; b=vzIcyk2shbrDCLhvTD3Ym5mwHHCnAPjuz37v2vVpU1CQrXBfpNRR5h4A1xttoM6NRW eJdIh4QjSD0/F5RNW2y/IkEQC5v1CdwbI1J4PDlPZNOXNTLRcHE03g9kdbJdEqlPXIgf SN0ttToV4YXUwCEhiTULhjALP3AEQvjVZJvVK2XtFOKkOOh5bBomL7DjoJi83UbtbSKW 4Qv4qDsg6sHx3mGSxuGayi+I4sSzUuIYlppqkvc+F3mkWNvZ4t7RR09dLSF5FDANKdFM EhEOlOkIz0BdsJ9WJIprEC4A1SOYKDcr+qquBTmWlGhHGdZ54mhZRaU8PeLjsIdpwpka RIYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R77E8hBV; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-83857-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83857-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ge14-20020a05621427ce00b0069025317ef7si1577773qvb.359.2024.02.27.10.48.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 10:48:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83857-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R77E8hBV; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-83857-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83857-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 13AEC1C21F64 for ; Tue, 27 Feb 2024 18:48:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E37DC4F896; Tue, 27 Feb 2024 18:48:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="R77E8hBV" Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 100EB4F8BB for ; Tue, 27 Feb 2024 18:48:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059686; cv=none; b=AXmxMDDyulljJXUzeuTz4C+Wg8s/gCW5AvQm6vfEPTI/ubm28mpiblbpmKUC5qyj6ZNpC4SJnJQjN8UeW/TTcehb8W4EMmsRhA47ds5fVwaDGAHULT6IsBOn+GTVkjOJ2oCfT5lfbLKsuAF2VKm42m6SKAownLbYblUjEyDRvqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059686; c=relaxed/simple; bh=eopTjD6dnBhQmGbU1b50iW81wisqf1duKytlAiZoS+I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Y7+jM0ql/WlUqwq0likq3rWkfaGWyDGr33+5HDmXFC0PtII2yS74/C1jRHrlNDV2OGzd5VbbcYh9C/pvTYolqAkI41ygtocNEo65lxd7ozMc/j/YKFPlKxgaVOrpfeNEq523lcNGXfUhzVDd01n6t6XeO63iLlF0SlDAow8nyf8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=R77E8hBV; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6e4d48a5823so3793776b3a.1 for ; Tue, 27 Feb 2024 10:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709059682; x=1709664482; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Q8ShmjsBfirtuVXn7YN7NE2+9S2ssUe4qcNu7gqy8zk=; b=R77E8hBVMGqBGagFYRfwRcGo/Qk+s0Bpxn/QeEk4KyPQeYsl4IpIRxtCmy29ksnqPU 3kRR25neRJUdEb2imXR1R0g4q9JBJkejJRjpurELLRsyK691fkcTL5wmkz06KN8fz0u2 oOZAwczL8HsPOzQS4asKKlqZmKlLbz1Sd8IV8niWe2V0uK4Q2eaYcFSYfg9rwc4IeCdf SUipNY8f1Atcesj+CjQ/oekZSzSb1/ssEjVSQZIbArUXYPOn0lFBqzYEKyno90GZcsvJ K8/d1Sugq/CvIj5Y7yBAA/EMgnoXgdF8bL795rBUXLEDvr9drmK65/yWRXjOdObt2HJQ fYXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709059682; x=1709664482; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Q8ShmjsBfirtuVXn7YN7NE2+9S2ssUe4qcNu7gqy8zk=; b=HX8psFHU7nOrGWYNElmlxF685ien67pNxJpHgO4/HRd1SFV27Jez7yHR7ohSd9uuPz m7KxoffVcvg7xTG4l8EmuD7vQZe76UgIjvVnzGyw43IlFO75Z+DwNnswkiY1NtCKXR0q vrYt6/GpWBDWztN6Y3deddflAYY1mtUfJToItVyQ4lYXmTA2jbT0uKHQb1c+Cqt/Or8i iFnbTGtGAuvOrVun3fMSOUHys6qATqy5rZ48YM9OuObU/Cz5Nqd+4jBjFn7vuHmWYMm4 I/Mp4Vge6K5UU1HDD6bk8qGHymh4XDoAdHHVVKdwTmwAVHkUglpcI1Kd0Jrl3pXirVyY P06Q== X-Forwarded-Encrypted: i=1; AJvYcCVkZ5F7a4o3HJqJ3yCzagaP52tq5HzHGK4SJbCxgHBy9fhpij9GSnZ2gsZHOA+BJJ/UZ408UtIK7Oeea0wRRPIhK/yb8iWy3ql6e3hq X-Gm-Message-State: AOJu0Ywn+8KZ7hl/swGVCjlPoGWmTf3Ac7WWQE9tjBZlVYK+6UohyIvt s7fz2Pcxm3xL+99/usBgMSXsm02ZERFe9G2RnpNGVIjuZOInx4l5YJHuJujiAA== X-Received: by 2002:a05:6a21:920b:b0:1a0:adbc:7a96 with SMTP id tl11-20020a056a21920b00b001a0adbc7a96mr3099279pzb.36.1709059682411; Tue, 27 Feb 2024 10:48:02 -0800 (PST) Received: from thinkpad ([117.213.97.177]) by smtp.gmail.com with ESMTPSA id km8-20020a17090327c800b001d8f81ecebesm1845645plb.192.2024.02.27.10.47.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 10:48:02 -0800 (PST) Date: Wed, 28 Feb 2024 00:17:46 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Kishon Vijay Abraham I , Vidya Sagar , Vignesh Raghavendra , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Minghuan Lian , Mingkai Hu , Roy Zang , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, Niklas Cassel Subject: Re: [PATCH v8 09/10] PCI: qcom-ep: Use the generic dw_pcie_ep_linkdown() API to handle LINK_DOWN event Message-ID: <20240227184746.GU2587@thinkpad> References: <20240224-pci-dbi-rework-v8-0-64c7fd0cfe64@linaro.org> <20240224-pci-dbi-rework-v8-9-64c7fd0cfe64@linaro.org> <20240227123230.GP2587@thinkpad> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Feb 27, 2024 at 12:34:15PM -0500, Frank Li wrote: > On Tue, Feb 27, 2024 at 06:02:30PM +0530, Manivannan Sadhasivam wrote: > > On Mon, Feb 26, 2024 at 12:20:41PM -0500, Frank Li wrote: > > > On Sat, Feb 24, 2024 at 12:24:15PM +0530, Manivannan Sadhasivam wrote: > > > > Now that the API is available, let's make use of it. It also handles the > > > > reinitialization of DWC non-sticky registers in addition to sending the > > > > notification to EPF drivers. > > > > > > > > Signed-off-by: Manivannan Sadhasivam > > > > --- > > > > drivers/pci/controller/dwc/pcie-qcom-ep.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c > > > > index 2fb8c15e7a91..4e45bc4bca45 100644 > > > > --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c > > > > +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c > > > > @@ -640,7 +640,7 @@ static irqreturn_t qcom_pcie_ep_global_irq_thread(int irq, void *data) > > > > if (FIELD_GET(PARF_INT_ALL_LINK_DOWN, status)) { > > > > dev_dbg(dev, "Received Linkdown event\n"); > > > > pcie_ep->link_status = QCOM_PCIE_EP_LINK_DOWN; > > > > - pci_epc_linkdown(pci->ep.epc); > > > > + dw_pcie_ep_linkdown(&pci->ep); > > > > > > Suppose pci_epc_linkdown() will call dw_pcie_ep_linkdown() ? > > > why need direct call dw_pcie_ep_linkdown() here? > > > > > > > I've already justified this in the commit message. Here is the excerpt: > > > > "It also handles the reinitialization of DWC non-sticky registers in addition > > to sending the notification to EPF drivers." > > API function name is too similar. It is hard to know difference from API > naming. It'd better to know what function do from function name. > In reality we cannot name a function based on everything it does. The naming is mostly based on what is the primary motive of the API and here it is handling Link down event. Maybe dw_pcie_ep_handle_linkdown() would be an apt one, but that's out of scope of this series (since changing that would also require changes to other similar APIs). - Mani > Frank > > > > - Mani > > > > -- > > மணிவண்ணன் சதாசிவம் -- மணிவண்ணன் சதாசிவம்