Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp178436lqb; Thu, 14 Mar 2024 08:24:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXcenFe4PX1NwbbqmB4+Kl2wh4NZ9zIA/B4bDjGINH1/h3VEPcBhWvy6+ovQA1d3tAjvGnwfOi8LmArhWWL2y76B0jhBtTErMnhe8R7Qw== X-Google-Smtp-Source: AGHT+IFzM6lvP3PMfXCDfAETVLckhVCiKYBgRzWrbWcOVcn7U6NwQc9B/IaXGg1z1gwGiH5ToaGW X-Received: by 2002:a05:6a00:174b:b0:6e6:5291:1779 with SMTP id j11-20020a056a00174b00b006e652911779mr8427147pfc.6.1710429855243; Thu, 14 Mar 2024 08:24:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710429855; cv=pass; d=google.com; s=arc-20160816; b=eMMbWO8z8f8+tnvLAGkU6TNiyrTWZJ5UlGAP/BdUb1RdO0aM6OLU4gL8zCsQXo+L9G kLpWuUmrg6RnYCkidhNFv1mkmP1I+uKGTsgdSXLVW4PQs9bK8Oz4DFD86+oLjGiLh+7L u4u+RYskjy8fiRV6zq378XUMMmTMfrmrkZym2WbvpJdDSzha9q3XTs5Uxli6Cj3ekDKY xPI9OXfAYbS/tUrmVoAyVDqvrHCzlo6ahZBZC33C5rIUcg1YlrjzOM+IxpVSEAhlo6rY AwxCEUsu1yE9kk4NeXTIGUiNlGHkob3ulSGP8JUUV3A9uAuGn4ZZqdjuTxkX/Z/qdG/W 0Hyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=uipF2nWjwEvJ8FinmI/99ZEfUz9FMdfPX7qMJmCrSQo=; fh=BiVSC0P5hIgHQifBgjD+yB2FWURmIlBGtpox3G3cRos=; b=St0xYLaypde9NTNBq0Xe48YaO0cPCGqNYdQWzzmjBzfTQ/9cGJ5y40v75bRUZGxb5n JrQOazuqEPKvVp3kPr/Xc7CcV4vmoUSD8HWNfs0BO5SmT0IqBgBWaoevhx9/PzVeuTml BJhGcpHPL/82QigpLZs5dQtnccM8DRe9Bkc9HGGZ77U1fl7EfYSLsAFwuLryeRH9c6Iy dSTEWjJ/n7vHsoXWl8Vj/KFPed+Zim7X6sVjInt8oLetZOseaGoMUxOWfwnifPH0G6Cu D7weOrxLCc/t1H3NzBUC0ytLuvQrKcaP9KPWQ0o6JK0Ja2wYsLXX7834sz63cpQAsMkY dPRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BlYqSTHf; 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-103474-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103474-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j9-20020a63ec09000000b005ce04795a98si761865pgh.32.2024.03.14.08.24.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 08:24:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103474-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BlYqSTHf; 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-103474-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103474-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DB77E284102 for ; Thu, 14 Mar 2024 15:24:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95E3C71B38; Thu, 14 Mar 2024 15:24:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BlYqSTHf" Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (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 30D1071B32 for ; Thu, 14 Mar 2024 15:24:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710429848; cv=none; b=hEaFGtKLPnSHYh8XTbPqUbt7z9QP27um6XMWx9uG6nJTjw1RTYcKHrqdmoQbE5aguYYPNounImntVWp/SdSiMZ0u1Y/LIgZRD8HfRD0x8TQ66cytkHaDVqt5m46yi131SIsJqTQ0nc12AE9xo/lhVhkUGAJ5b6ybU2IMXsdNG2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710429848; c=relaxed/simple; bh=+XqMRpYE8HYIeYnArh9TOIJOZHL3dBFs8VCBPD9Q15c=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=L57WF6vVbkt6CaL2NThk0ddWToP1DcPEY3thkY1j0K/vAkq/xtc705PeEykD6wdZ9EGSdbTR58pTN2em7tbxmk7vrxjcoUawBqp7jWVqTW0ReuNazXUnXlvlKBLEaHKUg6eO0D6m8vOgZ2MiBCasQttgYXIK3onEQX5XBoyFlZg= 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=BlYqSTHf; arc=none smtp.client-ip=209.85.210.173 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-f173.google.com with SMTP id d2e1a72fcca58-6e6ee9e3cffso340891b3a.1 for ; Thu, 14 Mar 2024 08:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710429846; x=1711034646; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=uipF2nWjwEvJ8FinmI/99ZEfUz9FMdfPX7qMJmCrSQo=; b=BlYqSTHfD9UyaO7QVLhiSf54KlVc81u084CL0d6bDiHMVx3Qds5aFDQ+qTDpErSu2D XlsgTVI4RKjJVl3UMQktfDuibqduqOrh1HGRbdLv75+58BKu63/lUGl5jZhh+LuGrVLs 8kpUs91JFZ+pfZUqE8+qm/rDtiTKciCLiRsD8O+HI+vtJ/KpVxNc2zfqKLDYN/40kpwD 3oWLUx15fqU9rXyhUW7NKKBqoX5elZUesr90pwDIwyR/XrH9T9agOWbd4tynlBEo7H3t fTgegKj4w9RFNTSUWX97cUYfkHQhJSFpsxWMNnwlE72cPxLUDAkPfjtXOj2yfVGrKzCV 3s3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710429846; x=1711034646; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uipF2nWjwEvJ8FinmI/99ZEfUz9FMdfPX7qMJmCrSQo=; b=FgK+awBSifoZrX5wfxW94fuLLRXd0O3GYBhoZIhnI7pETqo9o/NoC9jWRMk8dBhJlN N5Uv3VjsgDo7HUcNrjJw5F6utyXbU7Qv0VIrrzRuMWVvKbUOCBGZ2DAMbeSuxH1wkVXQ IMIgLgKUztcWUwMLsZWj0/zazsAUOScKRaHTOVoD1WTBZoUBs1iBb2YIqmCz2+Yt2fxM hA/Uynsx8/F1aOkjbnw7qMFUMfo6P9kVTYowHjZPPk+nOA8ssla9/zOb247IwCkJOSxO K68wdVssumR9JhBR7c1D+lByCsrn/mvjUE9ZuoMU6E521x+huDFqp3icFIWZB/aVqvL1 PvUg== X-Forwarded-Encrypted: i=1; AJvYcCVw41c6YUuhK00uBUTlZQ9ZKeovfVTWXrnHjAhYju92gmA4W5/cGkYdzH7o7TD7GXueZpF3P1IYg3iN1dX5oY6GFVM4Qjk6LsS8o49/ X-Gm-Message-State: AOJu0YydheJ4s4uCxUkZ6pf8EEATIWWcYWDS3Pb1m85Flnfu1sfylbm3 ewULVvA9xgQ77LMBalG/sSe/UkRPu5KAmjn/otCFcaJscLf3W8r9tQXNrb95oQ== X-Received: by 2002:a05:6a21:99a2:b0:1a1:5a12:9119 with SMTP id ve34-20020a056a2199a200b001a15a129119mr8387816pzb.3.1710429846330; Thu, 14 Mar 2024 08:24:06 -0700 (PDT) Received: from [127.0.1.1] ([117.207.30.211]) by smtp.gmail.com with ESMTPSA id m4-20020a63ed44000000b005e438ea2a5asm824021pgk.53.2024.03.14.08.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 08:24:05 -0700 (PDT) From: Manivannan Sadhasivam Subject: [PATCH 00/11] PCI: endpoint: Make host reboot handling more robust Date: Thu, 14 Mar 2024 20:53:39 +0530 Message-Id: <20240314-pci-epf-rework-v1-0-6134e6c1d491@linaro.org> 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 X-B4-Tracking: v=1; b=H4sIAHsW82UC/x3MQQqAIBBA0avIrBtQs6KuEi2sphqCkhEqCO+et HyL/1+IJEwROvWC0MWRzyPDFAqmzR8rIc/ZYLV1ujQOw8RIYUGh+5QdfU11NRpd+qaFHAWhhZ9 /2A8pfYuAfZ5gAAAA To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Kishon Vijay Abraham I , Thierry Reding , Jonathan Hunter , Jingoo Han , Gustavo Pimentel 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, Manivannan Sadhasivam , Niklas Cassel , Vidya Sagar X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2289; i=manivannan.sadhasivam@linaro.org; h=from:subject:message-id; bh=+XqMRpYE8HYIeYnArh9TOIJOZHL3dBFs8VCBPD9Q15c=; b=owEBbQGS/pANAwAKAVWfEeb+kc71AcsmYgBl8xaJsDnRXWXOn639N6QSYpQWMRYVyNmaaXhJa fn0bkPxFe2JATMEAAEKAB0WIQRnpUMqgUjL2KRYJ5dVnxHm/pHO9QUCZfMWiQAKCRBVnxHm/pHO 9aycB/9b/o4Li6j8PqMVlSnWfc7wdfhcraMkEMFGScwUc/THnarLDa5UEMcMICzCyb9OLOWRndt oCBxFCx4BL1ZKDe4PUbQUdo47vJm12TLIoq5bnXsy8rl7eUSaxklwzQaG1HxCbenXX6Ob93oo3M nOaWZ/FWBuLztkGRERM5PsXEcw0ViOcPwn3IlQ/1qBvKdBCQ+bJEtrJFih8ES1wXtxMCeeeBMem 0kVbsWosc0pA5xP6Q8EKQfQRX3VLIpRuoL1MmkEA+yQTL03Au8rJS8JowKwbh/MjtDwv+XSiSUu Xx+afP9RJhNfpvDPNHIJ/UKyy2Hhztd6xfR07xVMgfhQgjzZ X-Developer-Key: i=manivannan.sadhasivam@linaro.org; a=openpgp; fpr=C668AEC3C3188E4C611465E7488550E901166008 Hello, This is the follow up series of [1], to improve the handling of host reboot in the endpoint subsystem. This involves refining the PERST# and Link Down event handling in both the controller and function drivers. Testing ======= This series is tested on Qcom SM8450 based development board with both MHI_EPF and EPF_TEST function drivers. Dependency ========== This series depends on [1]. - Mani [1] https://lore.kernel.org/linux-pci/20240314-pci-dbi-rework-v10-0-14a45c5a938e@linaro.org/ Signed-off-by: Manivannan Sadhasivam --- Manivannan Sadhasivam (11): PCI: qcom-ep: Disable resources unconditionally during PERST# assert PCI: endpoint: Decouple EPC and PCIe bus specific events PCI: endpoint: Rename core_init() callback in 'struct pci_epc_event_ops' to init() PCI: epf-test: Refactor pci_epf_test_unbind() function PCI: epf-{mhi/test}: Move DMA initialization to EPC init callback PCI: endpoint: Introduce EPC 'deinit' event and notify the EPF drivers PCI: dwc: ep: Add a generic dw_pcie_ep_linkdown() API to handle Link Down event PCI: qcom-ep: Use the generic dw_pcie_ep_linkdown() API to handle Link Down event PCI: epf-test: Handle Link Down event PCI: qcom-ep: Rework {start/stop}_link() callbacks implementation PCI: tegra194: Rework {start/stop}_link() callbacks implementation drivers/pci/controller/dwc/pcie-designware-ep.c | 93 +++++++++++++------- drivers/pci/controller/dwc/pcie-designware.h | 5 ++ drivers/pci/controller/dwc/pcie-qcom-ep.c | 30 +++---- drivers/pci/controller/dwc/pcie-tegra194.c | 25 +++--- drivers/pci/endpoint/functions/pci-epf-mhi.c | 47 ++++++++--- drivers/pci/endpoint/functions/pci-epf-test.c | 108 +++++++++++++++++------- drivers/pci/endpoint/pci-epc-core.c | 53 +++++++++--- include/linux/pci-epc.h | 1 + include/linux/pci-epf.h | 27 ++++-- 9 files changed, 265 insertions(+), 124 deletions(-) --- base-commit: d65c75fc384ada26392a975c351689ec4e069c50 change-id: 20240314-pci-epf-rework-a6e65b103a79 Best regards, -- Manivannan Sadhasivam