From patchwork Thu Jun 6 07:26:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 13687922 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.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 3CB0413CFAF for ; Thu, 6 Jun 2024 07:28:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717658883; cv=none; b=Ig8Iqr8P56auvtdjwFUzURSich7TwsN4Aic1D1IAnL07rtW6pdYd1NCGcHbT/ieoZrDBoVcZpGHM1p9leGLYMFH2UjOdloo11EP4e1/Gdj4g0wQ177RioiqeDWpaXMuBwnoo47Rb4DURfWRyTEVOk2njk0gvsQOA/b5qdjmhobA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717658883; c=relaxed/simple; bh=iTBLcuvewMpJ4faEaIFRB8NCV5eK2XvDog669bY6A04=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fBCjtqGppi+yauwcW3tM3sVJEep/jWpOSp+xroD8Cla4sQIEj0H7EpqWyXG9+Kji84lR1wv72LDEajZFe1jKblx6U0BZRb+FXw7DInewMy41PfatL6eo18vaMDt3RS/nB1VI/KhtNppTMjUecGyABeG6a10xCL4SjPO4O8PwkBk= 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=N+/LS7OS; arc=none smtp.client-ip=209.85.210.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="N+/LS7OS" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-703ed15b273so516358b3a.1 for ; Thu, 06 Jun 2024 00:28:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717658880; x=1718263680; darn=lists.linux.dev; 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=HPG+iYxST5I5DbJlxvzuCXfj8r8tlsuRAuVmKBt4I54=; b=N+/LS7OSF7Mr7+cw3hadKc1AmiSx2XBpXXMBtA14I3HBKdxUG+EO1Aokdur8kFhiCT X6dR9SsQNXgr3gZPlFJQMRfPmfGKMeZyWATyIGLGJXQrXrRlq7VPkjEGitrlZv1vvF+U cyuEidXPaLpKW2GhmhZqxLXxhgdpVUti1SIkm0gEIMcLR+jsA9RM/auvnnokb2kjjUny mzenKTiW3ItP1LwTxcZIiJQMHJYRLXhBuc37fySX+8XX5NaRe1pdA3KbLQ7ZbQn3etd4 iKde+urofD+lx4mkMtSbpcCqauJFIpLhyAskRUyWOpPJ4Xv0QERj/MjAcA8UPnOKJlLf wdIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717658880; x=1718263680; 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=HPG+iYxST5I5DbJlxvzuCXfj8r8tlsuRAuVmKBt4I54=; b=wOBAoN7g/EN2wgD38U9GDuSGREjt+N1Zb9Rym+ARECLyCDY3OFiQFi9Ht3aaoLU6P5 fIPH7d7Xtmxq+n/aAiF0elMURKyE6t7tgZfkJ2rx9Ef2QzGbAqsBTqLe9CB05nqLrjmy S54AvGEZftoNwVJRHS3DZ9ukaAP/xJphkH+50fP2X+Pax3onD2UDVMSlkvP/tFH19Rn5 +zDr4jBYpHfz9wx8BYRRxWzQTuByZeAIkRPgE7gzrQAlWMpHi8gPsgcuVnGT6cKsG3i+ Dy6xnjRjELeK2QEiZH52bUd9rvSdzJyP77+cqjmp8rR+O1NyaOKEujZr1MDqSyYfh4Rj uPFA== X-Forwarded-Encrypted: i=1; AJvYcCUD6kZMMkZbqI1E/oqt2jckIp/Eug5HOSSW1kAwOsVH3LIn0vKySv7lKIkAEWGHhx+AV9ZxDn0QWFdiRz+Sp6QUnvX8 X-Gm-Message-State: AOJu0YxBbPac+J8uMWd74RVacIL8Gr/V9AVnK9wKhJU+d/Vsw8+OYXwO 8PZ9hSAatUDJULIA1H0Anw9ldBe9Zi4hJprsGC5GlCxZrkGFgKouBmAPesyBqw== X-Google-Smtp-Source: AGHT+IFcf9cgtatPK4aegB5pOtXP/U3r7+aHmKSySRB4gcmnkYTJLzQC9N/nujSZyq7rntRegQ9fyQ== X-Received: by 2002:a05:6a21:9994:b0:1b2:2893:4c30 with SMTP id adf61e73a8af0-1b2b75a28b6mr5554701637.43.1717658880331; Thu, 06 Jun 2024 00:28:00 -0700 (PDT) Received: from [127.0.1.1] ([120.60.142.92]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-703fd494feasm566621b3a.100.2024.06.06.00.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 00:27:59 -0700 (PDT) From: Manivannan Sadhasivam Date: Thu, 06 Jun 2024 12:56:38 +0530 Subject: [PATCH 5/5] PCI: layerscape-ep: Use the generic dw_pcie_ep_linkdown() API to handle Link Down event Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240606-pci-deinit-v1-5-4395534520dc@linaro.org> References: <20240606-pci-deinit-v1-0-4395534520dc@linaro.org> In-Reply-To: <20240606-pci-deinit-v1-0-4395534520dc@linaro.org> To: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Rob Herring , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Minghuan Lian , Mingkai Hu , Roy Zang , Jesper Nilsson , Jingoo Han , Srikanth Thokala , Marek Vasut , Yoshihiro Shimoda , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu , Kishon Vijay Abraham I Cc: linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@axis.com, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org, mhi@lists.linux.dev, Niklas Cassel , Manivannan Sadhasivam , Bjorn Helgaas X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1130; i=manivannan.sadhasivam@linaro.org; h=from:subject:message-id; bh=iTBLcuvewMpJ4faEaIFRB8NCV5eK2XvDog669bY6A04=; b=owEBbQGS/pANAwAKAVWfEeb+kc71AcsmYgBmYWTDAWlDlC+iP821vFRRCpXr79KN0oimjGpwM 9zYQuHhq6WJATMEAAEKAB0WIQRnpUMqgUjL2KRYJ5dVnxHm/pHO9QUCZmFkwwAKCRBVnxHm/pHO 9dUvB/4geNbdfN8AuZaua5Q6crO4wiBZbDIZpTUEWbj5cD3+PQgZdP2fszAcOMysVUd2LhEzvbX kN7XJZcOGcc8d4i5IFEjwKG/dbhVt/tdxFru22kORqs05rEFn8+aFrQwhtSGaYkYgqYgRfP5Y6W b7v2+d152TaxfMTEdc5KIpJ3NjqVYBYvg2Gm5ndnVM2TIBPLBmyqzyiXOFEURUukShXcXr+j5P5 wTPHtr9arU74ONCvNRavuhdpDxwvIoRgVqCiA2vDPG5DViOV2w7sRHoLC0PIvLJstIr0Gh5lZUc 0TbWhXew/SfM3kcXGjBTL99FKexWWdBkpH4rAOvlZ4HUiEBN 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. Reported-by: Bjorn Helgaas Closes: https://lore.kernel.org/linux-pci/20240528195539.GA458945@bhelgaas/ Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Reviewed-by: Niklas Cassel --- drivers/pci/controller/dwc/pci-layerscape-ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c b/drivers/pci/controller/dwc/pci-layerscape-ep.c index 35bb481564c7..a4a800699f89 100644 --- a/drivers/pci/controller/dwc/pci-layerscape-ep.c +++ b/drivers/pci/controller/dwc/pci-layerscape-ep.c @@ -104,7 +104,7 @@ static irqreturn_t ls_pcie_ep_event_handler(int irq, void *dev_id) dev_dbg(pci->dev, "Link up\n"); } else if (val & PEX_PF0_PME_MES_DR_LDD) { dev_dbg(pci->dev, "Link down\n"); - pci_epc_linkdown(pci->ep.epc); + dw_pcie_ep_linkdown(&pci->ep); } else if (val & PEX_PF0_PME_MES_DR_HRD) { dev_dbg(pci->dev, "Hot reset\n"); }