From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) (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 1E81C26ACE for ; Wed, 12 Jun 2024 04:36:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718166990; cv=none; b=pIrdSRFUbFpoS50rA/37rj0QfKzaRcV4kto9hf+/kP60ltWbPNxKxqKFCLhej39xmUHO/5GK72wNXQUBK06vbEPbuAzALAUVS3RNwbuEY2ArA6/lj9jyX73zvKFKgAX9a5oouulW/kDrjtt2o5B8ybvQ2DUUAD9TKkOJ2I8M9Cg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718166990; c=relaxed/simple; bh=EO0aImAqYw7a/OBDl+S8gijoba1Ra+Y0nG8ZUi4cOaA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UGZfo8l72EcpSMrAzoSY7LOPLUBoCiQvB3NK+Et4ByruEK4Mj9JqWAuZs7T2XxH4RcAsDlY2LhNPsK0NzNrUVi/dhM9WJljcTNZN0xQqWSguui3uFa14fKmi2P2XURdd4c39vDAOejduhdYW1+EzndrNA8BnF5fbe4SwGvT5g04= 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=xT9pBdy8; arc=none smtp.client-ip=209.85.160.52 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="xT9pBdy8" Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-24c9f630e51so3125887fac.1 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.linux.dev; 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=xT9pBdy8OdUohzyxLQWLJPoovawYIAn/IZFjDBPEiD3Yeym6HjamkDgQM4ghnWb7gN eyWkRiA4Sj9iGYuh6IcZe1bpjXVOpc+xesBmjl0WD9EfhWoH7FylKdWldJOyAAdtf1Yd 0hOJjqDCJW0/6GryL0YJQYFHg2AY7Ot60qRQiL5YdwInKl5yvP5nWWYtlCaHNm/VJ4uq LWpKBRk4kWzDcpM2Z1ZQ/YPx4UJJsaWNpCtvEclXvkbM7/IP0Wwr5H57KJ54LxV6NGgk npjtU79fPshaIL/rXMzac+gUx86/qk9j3ECozS3KSChvpaoyAWxgR0xleUDTJxhvCQDb 1hZA== 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=bhvzkzekAankY5eRqU5bsU295LwILzW0RIGmRifmRbNcGXQndBT7eAp9V2XKQl7Nuo mPgae27bbhdBu7zpiobhzUjeVItfjD/an0eZXo/EikpNoLLtEH1TFFmh9ogpZ8pq4F3r q1sctuGKT9i+CnrikbO1rHDAw+44xAuXH2hQjaIWqLbN6XmLFOT9bsHdO+7RaO2HxMgr BuXfOTqSCU85Bfvlii2+Sk+KS9U+pZY/COFQqZ5XFIGRMeX2q2BMtrJbaJW2+3lQQCfM YBf2aFnBh7dYn6WjJ10+21Ad/6V41GQHWfQAwoXrRGURRGzASKH1wecUcMqxGuZDNECQ nwoQ== X-Forwarded-Encrypted: i=1; AJvYcCUtFRVEj0IaH++S1W64KTs41hoqSelmgJqLh67ZhJGwWRTxhFEhLIviMM7PY/4PU8A39XzZej4SrLZn6rCzR1IxlAUr X-Gm-Message-State: AOJu0Yz0wZtRogJw/xmfNzmhs3OWawfYlL3VYUexNEfdIcOl9Z0fCKfB NlfjVCbgMQvoFgVpWuuAsM3ljRqm9UO1P7JMGP5n64vjtbTHddE3rLe7pd9xZw== 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> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240611220640.GA1001976@bhelgaas> 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 -- மணிவண்ணன் சதாசிவம்