From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10786C27C77 for ; Wed, 12 Jun 2024 04:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vH+4iQ0Kxj/vMdKXd1GL4axukTJSkL87xzz/uOsZjd0=; b=eEUi1Jav9NWTgIN+NN2gVnGPZ7 DWHsX8v9NXPT1OEyxEMiGGx44tgRo12m+fHDUC2NMwgphpt2+d3qKQosqvB3fV9Zg99CXoDGIN8Gz qmFUUg2DsfNKlF1jwPwBIyBtP7S/tBPE32pDaUY0p9Iv7VuigkllSBN3UANZoEsQiMqnO5kAPQXy7 hhmplhq5X0U4KO0dqV18nsedtyLbwGzOy28HbOvmQPaQGEUAG+WGci0t9HbsyAQ6grC+ugj2AZLRG lrBanxTpvORsNNlGbUPesuAyM6Umjgc+I/Zm4C4iV6DmXLAISyJ7RhoKuvC4hx51Tb9WhItRb+jCM 5njHN6kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHFir-0000000B2P2-313t; Wed, 12 Jun 2024 04:36:33 +0000 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHFio-0000000B2OS-2IrP for linux-arm-kernel@lists.infradead.org; Wed, 12 Jun 2024 04:36:32 +0000 Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6f99555c922so1972854a34.3 for ; Tue, 11 Jun 2024 21:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718166987; x=1718771787; darn=lists.infradead.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=vH+4iQ0Kxj/vMdKXd1GL4axukTJSkL87xzz/uOsZjd0=; b=G1J2zHz6PQbgxG69LhmpDxOKlHLjAFIP6H/q/6gRlWfqYf5OMarndszQIFzGsHGbst 54JUXVB35e/prnVZTJRtiGK8t5yy5r3myXFJzf6DyZkCZ45sJGIUZblfhzmVVsk2x6+7 GHF/4R2OYpOQFWOmJDRfJX3rVuNLXjcfSnbXq2Ngao91RrrsZNHieVsBkE3w1cGMRRAC SPD7nBetGGW39zYsw2fyAk8d4RkVwlJG/TmddBzH/7l62TGLNt8/91LivK7ru7bPBNcB z+2OujjWn/k4rtJuVtOVjmY5oJxgy89Q0L8iBrajITZWyj78hyQNykTxi/wOM8ZA6cGH 60wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718166987; x=1718771787; 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=vH+4iQ0Kxj/vMdKXd1GL4axukTJSkL87xzz/uOsZjd0=; b=A/2k/4WZ+vP3VnHQwguQVQq4D7YNJN+vwElSBOQW5qkILSwA4+WRDIam34Rkvcoatr L1sv+L9Ovp+BCSERDtzA4DC6SBQ6VqU9HmmAcUpgLsbAwv62PZ2XGUstPpMMXanVYIRA eWDr/iR96AaMrh8CgwqnnVSt3gRqao/s4cYCVWyupi0QX6xfsNvHLSDCI+C75ho+eXlT QHPzBkpFvvMoK/XBxttdVCwok6mgfBGHtjMUhpGAQVviT6Xe0szZQPBsjMznch1pzn9v DHqliQ6a5+c9DJNlq6M3N6A+9jHP7HYXpKZ1voiuhcIxPvkzCc8wTzNuDA+333tllTL8 XB3Q== X-Forwarded-Encrypted: i=1; AJvYcCW4XBvHr6jvSkOi66jaGicYwBf9ZU6+DTTG01HMWJGccwh9xclijkxUJLKfgBB5uFr9KGw+aRyX/Na42zWNMWNFLdod3lCZxSwcPXnM/gnsg6oS2sY= X-Gm-Message-State: AOJu0YwALUydI4UHG/Nq3ieZTq2UuKP3ANGtkBx2iyT4S5RRaoCSxlTA fnINc8A7EEw7Y51kmuxUkTZ7gNU4ZQFvFtdUNXsdS/JnuKz0stQQW5RAWtiMHg== X-Google-Smtp-Source: AGHT+IF/i1Z4g1iXpug+xajahacKVwnIvfnsiSOznBlRwgjL1WHJ0xairr9brTYDWvv7YNpLZYuzDg== X-Received: by 2002:a05:6870:d186:b0:251:46d:d32a with SMTP id 586e51a60fabf-25514b4e021mr927373fac.8.1718166986969; Tue, 11 Jun 2024 21:36:26 -0700 (PDT) Received: from thinkpad ([120.60.129.29]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6e9a52a3012sm5409033a12.30.2024.06.11.21.36.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 21:36:26 -0700 (PDT) Date: Wed, 12 Jun 2024 10:06:12 +0530 From: Manivannan Sadhasivam To: Bjorn Helgaas Cc: Vignesh Raghavendra , Siddharth Vadapalli , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=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 , 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 Subject: Re: [PATCH 2/5] PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers Message-ID: <20240612043612.GC2645@thinkpad> References: <20240606-pci-deinit-v1-2-4395534520dc@linaro.org> <20240611220640.GA1001976@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240611220640.GA1001976@bhelgaas> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240611_213630_618411_6DAB30E1 X-CRM114-Status: GOOD ( 19.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 11, 2024 at 05:06:40PM -0500, Bjorn Helgaas wrote: > On Thu, Jun 06, 2024 at 12:56:35PM +0530, Manivannan Sadhasivam wrote: > > As like the 'epc_init' event, that is used to signal the EPF drivers about > > the EPC initialization, let's introduce 'epc_deinit' event that is used to > > signal EPC deinitialization. > > > > The EPC deinitialization applies only when any sort of fundamental reset > > is supported by the endpoint controller as per the PCIe spec. > > > > Reference: PCIe Base spec v5.0, sections 4.2.4.9.1 and 6.6.1. > > PCIe r6.0, sec 4.2.5.9.1 and 6.6.1. > > (Not 4.2.4.9.1, which no longer exists in r6.x) > Ammended the commit in pci/endpoint, thanks! - Mani > > Currently, some EPC drivers like pcie-qcom-ep and pcie-tegra194 support > > PERST# as the fundamental reset. So the 'deinit' event will be notified to > > the EPF drivers when PERST# assert happens in the above mentioned EPC > > drivers. > > > > The EPF drivers, on receiving the event through the epc_deinit() callback > > should reset the EPF state machine and also cleanup any configuration that > > got affected by the fundamental reset like BAR, DMA etc... > > > > This change also warrants skipping the cleanups in unbind() if already done > > in epc_deinit(). > > > > Reviewed-by: Niklas Cassel > > Signed-off-by: Manivannan Sadhasivam -- மணிவண்ணன் சதாசிவம்