Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2068526rbb; Tue, 27 Feb 2024 09:36:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdXRFL3LxYu9a4MRwP9sjOAOa9X4GQmyWb8mPcNTJBCMC+B+QNwgkvAkEzmzNakz2zR+SruhgDabVX/EoIqX1VS6ZLvjaYKp78xT86fw== X-Google-Smtp-Source: AGHT+IFZniLB9/2VX5+iTSLfTbk1NObjIjGwq3kMPVLcljuaLV3btiUCbSCOt8dZWU/aWksTU8GA X-Received: by 2002:a17:906:255b:b0:a3f:809f:6943 with SMTP id j27-20020a170906255b00b00a3f809f6943mr13027ejb.23.1709055367308; Tue, 27 Feb 2024 09:36:07 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id du9-20020a17090772c900b00a3eba52b3ffsi921356ejc.821.2024.02.27.09.36.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 09:36:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="lbM/fVH9"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-83735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D30211F2269F for ; Tue, 27 Feb 2024 17:36:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2905E13A884; Tue, 27 Feb 2024 17:34:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="lbM/fVH9" Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2052.outbound.protection.outlook.com [40.107.241.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C98B4E1CE; Tue, 27 Feb 2024 17:34:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.52 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709055272; cv=fail; b=Jo7oHHuEFXO7lLdcXE4xbbhqs9e/XSUXo7vO7rT0mClGhB1U/vyC6shM6biuPRZ6RKDrciqp0H3iMaF1TG0GDhLNL7Lf+EITR3eD2rj5ux1nnB2RxeTx9rkqAmqtGB/BVo4iEXUHijrJnM7yCaAg9AkOnvS5lpp//wIy0q7zeC8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709055272; c=relaxed/simple; bh=Sy+4OyEDi1a6FW1jsF1meZghElzLzqtxfzDrB8IG1PQ=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=tep7fKfG1ylIXaX2gpqWi/swpBd79PWWZXDjJ4tgmL/o3n9HWEtV226U8x6VhHAcG9rKOH8RwpUSJdWIVXy3yWnt2uBrQZAylzD9+k2mggU/ePVAjB/zfmFcaKxA4O6/6F6XZ6Lr3MEHLWvfmFlo05H2Hw41wqwJQLQS25YFx00= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=lbM/fVH9; arc=fail smtp.client-ip=40.107.241.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=le4OiT3C7+GzA/74eRLPhyzo6UT4fV2WmraA6J1H8dUew5ck2gPe3JjJFqSAYkwv63rw8p9a8GMp0Soe9x6B4iFNmmf+nfRn8J7oT4NKbV0CxhQe3sSHe/S43tvs6IFmnkHR9Q+nYW/WEdaFiCDuvaiyDa9b5wHsntLbuhcuxU6MU3qZdoVfJdcIAderDxeict2TeSWS8mJ+jRthBYq19Q6gwI7KdrZttrhoCypKv/QhnBEDJbCIKCzcSh8bKUCuAw5w99qQwK7QElkBVKLLrfD8u6dy/lyNuTHyqmiOEJ5jD/gNMyPaiSPaU44bjaXGpMhnT7VRbltMsrAOynhFRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qFZ5vmbctW+lZSnmeEDU0E16ZcjcXcndHr6+EwaDqBw=; b=AmEwTbpoCWggcP7UrNydQhbAANDN+Sl4SUFZwt0mrE7CzVAcraADbqhVZ8K+8+x+yX+oW6scyZS9LxFVdbd5dCwK+GjEXEWTguV36Ru0rHUPellSxp8AAgiEiF0PlzifYdRS+4ikEhJJHiuwL0rFK8C8Q1FhodJq1rKs9M3laxFvTLAgbCOpr4TwcaBHXfGV4P7jxybmoMAjOTnwKqF743wDQoOZeKZ9qEgN7MFcXZgCH2xMmnBi8hjLFWoRKKfflrgg/g00p4v5TqIDOJSN/f0xDSzCN3GKQLKqpvYVGu35Ns6JNPKLUqqpdrhsy4ojcdojIgpA5iIuI0Jd41AA1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qFZ5vmbctW+lZSnmeEDU0E16ZcjcXcndHr6+EwaDqBw=; b=lbM/fVH9kGZKokgknj2I70j8Bkmm1NUgHneUavR1VXX69Nq5MIb+yz5pYcGXoddTPl2xVpdvhbYe25+cKbOBj9ddDbwkTemvkMu3SUepsmtuQRXVQjDRGF3/NQ2VYyv3DPtw7avMv87S8z/novWHb8lGOmNhVD2o/zfsV2AWPkI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by PA1PR04MB10171.eurprd04.prod.outlook.com (2603:10a6:102:460::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.34; Tue, 27 Feb 2024 17:34:27 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9af4:87e:d74:94aa%7]) with mapi id 15.20.7316.035; Tue, 27 Feb 2024 17:34:27 +0000 Date: Tue, 27 Feb 2024 12:34:15 -0500 From: Frank Li To: Manivannan Sadhasivam 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: References: <20240224-pci-dbi-rework-v8-0-64c7fd0cfe64@linaro.org> <20240224-pci-dbi-rework-v8-9-64c7fd0cfe64@linaro.org> <20240227123230.GP2587@thinkpad> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240227123230.GP2587@thinkpad> X-ClientProxiedBy: BYAPR06CA0031.namprd06.prod.outlook.com (2603:10b6:a03:d4::44) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|PA1PR04MB10171:EE_ X-MS-Office365-Filtering-Correlation-Id: a7cfa71f-a0c8-4cb4-b7a9-08dc37ba58b9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oQMTbWrdZj+saAw34uVAWeIMcdE5r1Q3yb4cn45vA7nrVMuINF4a6PPEWGFOi0EG8GWdj7D/lMjExEkj2igAlUtSIh83eQV4UjtiB19clBblSs0H7IxtCNc4tO1K2g6SgIHZkzkat1vV64grC1mUcAm1aWDnBDzHlIKUkfayvw95QOOkuNSMMshRNCqps357aBM1K7YvbjMzFEKs1UXQsMqeYtq9JSzpLQ3m8xT4ZEI7n2ByhARNB6MHb8dpHUEchBZW9RvsuL+4iYJQB/wwcRAzl+zW4UjkVzAgfO9gkS78U4NCT2Uo1vkapWdU7jnmXLuq1sc8wlnQ2muxSFnejsWM4gyOfxYpa4bi2TWzhSdbPAJMP+WWIps8tc8AMPKp0xNUk+NU1oT1TpS7AkFSAF/cpNZ4tybfO7aT7dOYzg/XfFxCavOooxucNY4yyygcG8NzGsVQJCJS3DzJWIBokVplqVlC3M6KjwkTXUsJeSWIlb73ByFai89Gm7dGtAVXUOuE3fhor7Qou3VZ4QLilj5HuhqXxj3xYH1K88talVozUI55PaghQwSpMQUmOXeuRdEFoBwaqjJc4KPXP0OEQE7tD2MNaamm46E22ogZUhxIF+zka87YXXZ9Bi3TZT0HOI3HF5dKYf1gZo4lMJFwb6FK1WVGZgm+6a0KHwpCl+FF6BaeAZ5MI20SS9cGB3+cAZj4QNrV/JAwTKJpGiqkzg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T1I3OG93TFd3OEhJblNRbGtxYlFJUHJzVTZpTkg2c29CU2R5QUFUTWlrZDJV?= =?utf-8?B?OEh4MkdXekJlSlYrOVJvNlBaUjVBWkgvQVJzcVlIR1hHMmgzTmhwRnRtSy94?= =?utf-8?B?WnY5UUl3NG1iQTB0UlYzd3BSTjYwdmEzMkRaaHpSYWgvLzE5NW1GamRiS0E3?= =?utf-8?B?YVhiNE9LaXNZL3g5anpSZlBpcEZwRlFudU5DM1poMFFMbGRhdDJwYzFIUmhu?= =?utf-8?B?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UNuS2ZETUpUT3JNd283?= =?utf-8?B?azhwc3FybnFOTGhvcWJOb1h0UnVVWkx5RWsvdjhjazBRUk1CbUNkcWhLa2hN?= =?utf-8?Q?vsKSI8RlRCZByOmoTR2PhiIFn?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a7cfa71f-a0c8-4cb4-b7a9-08dc37ba58b9 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 17:34:27.3019 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cxsR+1HjWqRYAIXgb/UbZv+Cq7880d3XNYOBLbJq8KhyCR6uLKTxK5wj+JlCRNt87Ynop6D5+B/W1n/8IpI2Ww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10171 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. Frank > > - Mani > > -- > மணிவண்ணன் சதாசிவம்