Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1527905lqz; Mon, 1 Apr 2024 08:53:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWdkH8mGfbLQPX2n+qpWDg6BwVm1G5YOB1aeMoVRmsEzPvkLfBlaVCgF4e4nWTns/eK9sNyZ2lMerC66g69uYNTQHlQWfgDss08CWV4g== X-Google-Smtp-Source: AGHT+IFElbI4IzYqLOBT1W5CVias8XH15G+O6G7tnO2fcch1VU3SyF+uC9OgP2h6C8ll8I1CEkwm X-Received: by 2002:a19:8c12:0:b0:516:a1ce:6a20 with SMTP id o18-20020a198c12000000b00516a1ce6a20mr3235430lfd.24.1711986822716; Mon, 01 Apr 2024 08:53:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711986822; cv=pass; d=google.com; s=arc-20160816; b=LLY1Fp/sGJuMtyIOvkbVaB0VOFNQkm0VbG0rleaAOS4iFb+vpANuGForT4A9MLDE9Z AMfTWaQIry9pMUNp+lgERE1Lvi/YP2kTF0Jg434aheQyHJnATkj7GH9CN/gkmJ8q79Mp X4ZcuLTeu9u+Re21uUUdHAacbQ00GHMN7numeYbXQUbvgyRSYDCBC5xgltsPfdaW/tYm fEcZkXujc9EhAS3kFf3CqekLhZsLg02P9BdpyiBFaS7o65nHf581/4AyOge+3k5h6xUN k5DNouKsM1ll1Jud7zAJTDlZqSBZwDz6ubxucym/xaiBIF5WfErJdd7eo9Hb5LIUkzMX DqTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=3jszqw6C2qSlbopOLyelwWx4NbFpqH3DEAKuVgxD1es=; fh=mJ8ZDKK5lTEaOHtY5UPkkMM/8Bh3MeywzECsSTbyWBA=; b=Cc3SWnRcYRgsWpNNIOeBsJh/L/gZOKUXM9YVy7dbGDl1gewse2bXH9k4Qy2HarIaSj c0lTM0otNPjyRI+BA8QU45XKi4wXqfwM3zOlrkZ628WhYbu37WQxyNZr/Wzi9NgY9qNM ntGYM2mDRQEchPLQrB77A0CWNYU1qLFwL0jOEK7oUJJiyE3EGLJrcj4Id7Twu42+0GMC U0OeGpRndegL8i32M+I+jxK3r0ivxgn9NQ2EHCEX3lallWesxhHyTVLBL0HUc0ditqIX p8EyeDRvc0u88eQFdINK9xI27VBBm7edPL20gnW9yrhuJfOyqDjypwJznqHAfD8Cu1Jj pa6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h71Z7G+J; 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-126832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126832-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bn3-20020a170907268300b00a4a348f4480si4773518ejc.723.2024.04.01.08.53.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 08:53:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h71Z7G+J; 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-126832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126832-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 48E021F21B96 for ; Mon, 1 Apr 2024 15:53:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C15DE54BF6; Mon, 1 Apr 2024 15:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="h71Z7G+J" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 5F84853E1B for ; Mon, 1 Apr 2024 15:51:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711986685; cv=none; b=LDgvH//WVjMift1cEvFnh+crFiVtomc7NS94SJKaZ5RSAHgxjs1j0QEKIF9g2/WkC/zEcX8XFGC33ZaqbeTEzanpf8eq4f8rkOVziACBKSQnhy2glaUw7B2vGQzOTz01B2MdBlNKvC7RN0WMPxY3pR0y/cif7AAcJo756BGSsBM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711986685; c=relaxed/simple; bh=8yY6jCOZX7OXEAdw+SEiYpcVr/6cp2rpK2Wx/LrayPc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pCe2YtTYrTqFyc9RSEo6Gv8RBA/4xpql60f+jyOWyIkZXX1X90VPQ/IkoCDE/m5z/dcty8OtXCIYhvNQvlJL8yAGMm0Eeb+6Q+l2BUKy0MUlRNUT2oh96xgR3u7pnrH5QCj9XmGN6kTOx35R/sWcfe5FdekUb6Av2AojByyYza4= 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=h71Z7G+J; arc=none smtp.client-ip=209.85.214.182 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-pl1-f182.google.com with SMTP id d9443c01a7336-1e2235c630aso16625085ad.2 for ; Mon, 01 Apr 2024 08:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711986684; x=1712591484; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3jszqw6C2qSlbopOLyelwWx4NbFpqH3DEAKuVgxD1es=; b=h71Z7G+JJsyLTn9bgyHREzG7HRT5GeYqTkbemBCR8G5235KsBTYVhN6T3VnTy3980U cQETVDQVaaxWDNuQ9k3v0X2GMpjhMkuROpiWIO6A/J5M69ej5ZMqOdqYWeyQzUEv1hxH OJYSWlDxrTL4MrmOJu6LYkZa8oLM904GAxIzSbox5aJHZqhTELDfES677vPNs6VLJhii 1jJuGPgpPBcieVHaQg1A5V7zET0MA7T3A4owQahIkTpO+96k61iq3M6BjLHeVIUUPsOQ 3PwdmDHm+qMtgAA5IbJoUewFeBttSVju7CanfIYNR7xiO4MAsoNmwED4mXrqQtXnnnzF oVBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711986684; x=1712591484; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3jszqw6C2qSlbopOLyelwWx4NbFpqH3DEAKuVgxD1es=; b=ZQITb4XAiBgAVscJOOclCQiWOzpr7F+7dRBKh6U2ee+A7wC0R7BjNeWt/sn8rigUln NlHfvm+uxiqGvtSgCJkoSeyDsdIYFicrRs1SjMQE9UEW4xfWpW23GlfX0Lb9y+IB47D7 ldANRqb+bHgB8hyuEX904CKhri1ptAB4CnHvDcbS7ZtWMuu+fX9gf735WyEI54jJgqKa jK2cVUw2cXT/gOiPTrSgOkyOazeH9L1uA1RehvyguRXj+e23/zaAFqrq1pH7sJpitG+H m91LW036/nX8FyEFlU83k6R/JwLQOGynSdleVTetp3TN5Qzk1JeFppjDcmKOsPLKxbP1 SgLg== X-Forwarded-Encrypted: i=1; AJvYcCXo1OMgRI1hUvKSH+N1YSZQmVE6F4ZVo0fBWQfB0WFuNM5r+BXPNNzcGy5+pUmxQcEqkNnU26vlnA7Z+atqPO+3sBQnCMaWwGiAS/wM X-Gm-Message-State: AOJu0YyD0QTdob+OLMiisL9p0VLU08qNfEjZqQNbsLDFCML6yJiJTP8l qdCNOk5uNleuIcwok0x8eHBmwIsWCgt6S3H1+47ITJlSzT87x5+HFdZzXdiDMQ== X-Received: by 2002:a17:902:d492:b0:1e0:e2a4:1b1b with SMTP id c18-20020a170902d49200b001e0e2a41b1bmr11748880plg.0.1711986683577; Mon, 01 Apr 2024 08:51:23 -0700 (PDT) Received: from [127.0.1.1] ([103.28.246.102]) by smtp.gmail.com with ESMTPSA id kh6-20020a170903064600b001e21957fecdsm8949076plb.246.2024.04.01.08.51.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 08:51:23 -0700 (PDT) From: Manivannan Sadhasivam Date: Mon, 01 Apr 2024 21:20:34 +0530 Subject: [PATCH v2 08/10] PCI: qcom-ep: Use the generic dw_pcie_ep_linkdown() API to handle Link Down event 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-Transfer-Encoding: 7bit Message-Id: <20240401-pci-epf-rework-v2-8-970dbe90b99d@linaro.org> References: <20240401-pci-epf-rework-v2-0-970dbe90b99d@linaro.org> In-Reply-To: <20240401-pci-epf-rework-v2-0-970dbe90b99d@linaro.org> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Kishon Vijay Abraham I , Thierry Reding , Jonathan Hunter , Jingoo Han Cc: linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, mhi@lists.linux.dev, linux-tegra@vger.kernel.org, Niklas Cassel , Manivannan Sadhasivam X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1139; i=manivannan.sadhasivam@linaro.org; h=from:subject:message-id; bh=8yY6jCOZX7OXEAdw+SEiYpcVr/6cp2rpK2Wx/LrayPc=; b=owEBbQGS/pANAwAKAVWfEeb+kc71AcsmYgBmCtfV6J8VpiGQ+aH7wa+/NlTond9MlF7bJLsXm d9oE/+P1emJATMEAAEKAB0WIQRnpUMqgUjL2KRYJ5dVnxHm/pHO9QUCZgrX1QAKCRBVnxHm/pHO 9c18B/4wB2b/Olqnabq+LzKAm23UYq0JFUhH2Qhade00RQj3OTcedNVpMx4UL8xMRS+4B8p/SeS xCYORBSL4g0whqjretPvkDWShAqvZozuSdlJg9HALExtjrSPRUVwFUPkCU3ckGOSOq3GFDnlxtE OCufJkeUAdH61kw1HG3N68f76R73Hx1TxiHD4fdou4clcoUE2UyGcwWNUpepCV1jAoIX9U3/mC7 0hghQdaBJfpjKBPI3paNexfLsN3OULjAQJ0VqOHVAoQzy2wrFDLsB3EJEBMMmp0ISggPfiVM53P P5aYybqqH9z/OHedlriYtvH64hEBIsX+WdwDpbiKUMkUCnl/ X-Developer-Key: i=manivannan.sadhasivam@linaro.org; a=openpgp; fpr=C668AEC3C3188E4C611465E7488550E901166008 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. Reviewed-by: Niklas Cassel 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 e4b742355d57..811f250e967a 100644 --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c @@ -635,7 +635,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); } else if (FIELD_GET(PARF_INT_ALL_BME, status)) { dev_dbg(dev, "Received BME event. Link is enabled!\n"); pcie_ep->link_status = QCOM_PCIE_EP_LINK_ENABLED; -- 2.25.1