From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f42.google.com (mail-oo1-f42.google.com [209.85.161.42]) (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 E7BF423765 for ; Wed, 12 Jun 2024 04:36:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718166989; cv=none; b=eFVBTLEkBdbFnBpRdY5L757NJ1QxW25fEwhs1n0OanVdILRBlrEzzpPR/bYyLlu4YztieZBxcwMKL48MM7zRMgATSTVC6X2eFKk1s6bmgOCrfEP4Q4la1oDxptL2b9nlKI6ldaxs1IljvPtbPmpdik8fNBX7OaGaUblhcMioMRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718166989; 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=BNpCMXu+lIxfklmQnvXQ8derFWuZpWUVmQeRIqAa09f1C1httJWoL6Hkow/feKYyzopf0WZj+TpWO218NLRJzQDnzB+Iah1oJPzfgucKECjQvZOKQ/oFnQ5b+4t6K3ZzT5zjkpAdAiWUpSoPSHUhNp+NusMoYA1SWtt/FFLSV8k= 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.161.42 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="mO1SE5N/" Received: by mail-oo1-f42.google.com with SMTP id 006d021491bc7-5b970a97e8eso3538497eaf.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=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=BtSsvpjUHoNb2Ie4nkmKq3TuwL5Ljaw7cF/WbW54yaTIi4H0pnbD16ADPL5+WS5tCl DfN2BKHRh3POX++Cxj7kT1j/tMwg0r3fnLG5dvW3ostfvArqiQeW0/2uGJqFxGJeGPOF F/FYgqirovPrHQk/gcJFVf0RwVl4hCo0i7wkYX8QcOeFMLwnaFSVbI33TAIzkijozWLu 5kKeTZrmf/RoetBcbWIX3BBOr95yC53QtBXga78xBCqEP4iBQ4YHH488b9CasoO2dLx8 rWL82jjpmj08KTrZ4ZkVjsKAQxX6Qjsmmq/uKQs0UA7k1McVlc9h+4/5CseGesKi5jQ3 99xA== X-Forwarded-Encrypted: i=1; AJvYcCVOuk3Y50SpUPWP5LhUuiqCZ6jpkJcY83iYlqlId2jVt5yZrIP3yKzMnFRbhxVVyzOw0zOj8bfOUPopX+0kXeEDAPlCyeXKyFYeN0BTFg== X-Gm-Message-State: AOJu0YyEW35LY7bMhO56uLcC2nnRKSxQQqI5RoIJi3wzPlgLrZkmFoRK OfFwXLDTdbPF/00mrTFp1PpSyPV9kAFvM32r8sOWAmACAaIzFiVOfI7CtWOyAA== 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: linux-arm-msm@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 -- மணிவண்ணன் சதாசிவம்