Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp212002lqp; Tue, 11 Jun 2024 21:36:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWFOh/s+EU39+EX5g52oexfG7ize/32kgGBUXSaH68o6EWNoAL86q6FqNOb135oD3/i0zJZo3Hbb+KKXB1tquWDOd+eFmRH0KbWpQj/kQ== X-Google-Smtp-Source: AGHT+IEFr4JpmM/n4TsHiWFQPC0Pv/fLv1+tvmoPYqLXOZklrrQSMDz3r7Ndk8qTAXULS2seUg6/ X-Received: by 2002:a05:6a20:4327:b0:1b6:dc83:8717 with SMTP id adf61e73a8af0-1b8a9c88766mr972355637.54.1718167002954; Tue, 11 Jun 2024 21:36:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718167002; cv=pass; d=google.com; s=arc-20160816; b=x0XqBFNDiFxvpkQqzkuPG7cE2y9lfZjSV7EhCMgiZQEW4DptuMeaoP7pSaZ4iIvwRv DWHCjRi/M6A/AX4+jyOoHYJPCuxUMcs6/lw6n875I3vCDd5YOvSyn5rQwmYp+OpmrYlg 31+iqbU2vmRqX+7eRT/CIrhiu/822K4iS1iCI6BmCl6KZAQSOzBdhU2oaGUKBHdBRYVl h5QhlwmUClRZ6W5fNzpw2FYVfoMdDWR3Kk8Hbn1riUbNWTZh/850DOOadpx4QNht/t7p 3KQSmitCia9RPgi7mJDY1aNDjh3j6atAPrWZ+bMGw6c2KCc49Ngy0jAyUaB+GCSkKAh9 gZMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vH+4iQ0Kxj/vMdKXd1GL4axukTJSkL87xzz/uOsZjd0=; fh=B6r+Xi62FEMJS0u8il3F4CYOyDym55LnVE9VRq938WQ=; b=iMcX1p6nNEK98BsntPXl9mmCsWBcfJ/offNtBJGd5G8bB212AywxkPdOJduACNI1h8 RZSXJcounziYaiGkQtLfjiYduF3gz+JqZHndqHZxfuVJNO1XDgpedJEqrykJpBlCzDo5 Uzf0zTdNpRRIyMzEAf8Eq+/6KbDVKWtDwR5gZ+Z1IXhyo1GIRJ6AS49dgcWq0+Bd03LE ZguWOUj9aQkm0jnTRMign33zbMg65ocuIqqt/ioBNMWVT3G3QIvrwEQE4cU1YTGxYelU FiLBHFSxsMB0dw2LnJ1loIGOcx+rPfJGrtxYLnuV3y4q3tpoLCG7jeNZHEp84P+IBKVm BnMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mO1SE5N/"; 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-210914-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210914-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. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c4b047cec1si23767a91.22.2024.06.11.21.36.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 21:36:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210914-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="mO1SE5N/"; 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-210914-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210914-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 85D58281857 for ; Wed, 12 Jun 2024 04:36:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D29642C697; Wed, 12 Jun 2024 04:36:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mO1SE5N/" Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) (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 028A3250EC for ; Wed, 12 Jun 2024 04:36:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718166991; cv=none; b=Xpu0DPxLKR539aQ58/peYZKOvuv4eqVq64Fw+S/fKmM5plKupSDOpJjtkP2hLds8ccx1WW+Z6L2sC1+3g4LAf+11Cng/jNGXqo2yGiDKeRjQWazSKLdTEPjQLOSSSGArYKIrfA/7yt0KXW4opuNx79btCgNxKb92unp6BL8j1RY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718166991; 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=ll8Wh7QhHk5bFrVnZUkydx7/VRTXuiyw3Y38WNHsfOFZWZlmlG/Lk9eykqAO+rldqgaCXASCYtnLp2rDAopZRRvrbvCgJ6ErBEMW38W0buDP3OqIW4oAl682ceI+SkQ/1F8q9/gbNp0L3moAuwnS+1iNxBziDIfC0ZWXquGaoLE= 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=mO1SE5N/; arc=none smtp.client-ip=209.85.160.50 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-oa1-f50.google.com with SMTP id 586e51a60fabf-254aec5a084so1721738fac.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=vger.kernel.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=mO1SE5N/M0tG01ESL1v165Gc2cXKhIEQpVMvkNmR1k8hD6LT/GUQH9T67w1/ZiUnJV BTE/83PZ0qb7z5x+EYoUI+EXNIzw4/Oy+0N+HB4DqIWlH7QzI1mvaOHg1hR3sMefS5QJ n2Fv8qOybF+xsyHxwyd9be3qbW3T6Zp2025NcTeFJtwPbUJBl2L/Mi5BWQXBjQhdaZ+c uy8wBEIcxYZDH/aWFLgpYggu8LUM9H1fxKni/vLZ0RR0bUKVs5Ufx6wU5rJTzMtRvvPx 8aRoU4+jvADQXEwVgeVkicXj1fENT4Tgg3sW159UCvmNSigq2yBEDPfGy+oUYp6U66+J 1+mQ== 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=Fhn1BOUa7Jm0jI8neBeRp9zar7DV+kvUo4DjyuOh18b0fQewEUXR1PIcxdsAA4EsGI Q/W/oS2jDcuTm2ICUj4sWAifOd1VvCSk5GFeg9NbPbv1HvUKdqIA81j7jj/QWOAkR1HY FHZPMW6P0Sm1zEPs5VBYI/sUGlbED3T5RWNcfm7HBl8zRag+vb84/zel9poudF1xX6Cc Oj1tCifBR4u2WhPGTkqEzheA8hzVE36jiKCYtBqKkaSGygh1CGR/izsfkCm7B5epxc6G rPPeMQdnGRVV+XzTkr1PYJ+u60OFsduX7oQo87gvrolT3BX0wPV8xbX2g3xLo6sn5Lky 0AUQ== X-Forwarded-Encrypted: i=1; AJvYcCU+xRx3KcWN/Abu4Tu23hNPDf18i2meSqAA+UYipFDKBwvPDXqWi9D77M6yBX1NVOvI/n+pcDpjNddMmw7CoU0itzdWBFmkJZvvj+ef X-Gm-Message-State: AOJu0YyVrDQndwbqpFVbFJ+qb9YM0/bdtBCMWVDMg6PzsV+CxLlAHcT1 5DPXQ+66Eabwqy2WxM+5Gf41BbDSsEMt26gM9uFTRNZS4F4m94D3XfV74zE3Aw== 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: linux-kernel@vger.kernel.org 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 -- மணிவண்ணன் சதாசிவம்