Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp295553lqt; Thu, 6 Jun 2024 04:05:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW522TSMbrlc2HW8Kti1JRAr77dPMKGpPLckX7nz6vg2ea/AfkzlF/F3XVovbK8mqG2B6YfGBl/AlvmXg7PejvWdVssQUyMbQTIq/jZQA== X-Google-Smtp-Source: AGHT+IGVA8Vd4jVhzgJOO6n26cNX6MWbPBFSaE55H9NmBPzxOpb+TKsitPk9HNq9FynyykgakYTi X-Received: by 2002:a17:90a:cf8f:b0:2c0:19bd:543a with SMTP id 98e67ed59e1d1-2c29998f35dmr3238097a91.9.1717671902220; Thu, 06 Jun 2024 04:05:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717671902; cv=pass; d=google.com; s=arc-20160816; b=R/yWgh8YGiu4Lb9U1ZBDaOvjsPOMOzbcSqBqUf73zfu5ZNmB3LH4JCUXb/u/ZbQiWk L4va/vbgJjMK4KYt06EhQQAYl1gEZIwFQdGB8BwNYbVrd/+ZbuKr+pNxPnIbCQ4LwobE hPGEoOzN5+0BoIquRUZWDZfdA2PbN2IMBBuUpMvYzRTKwgWnHfmSwUs+YuKK+RyfAxwn M4oIKF/ho++ki0YBwGBWFUJjtaJmB/C/TSbH1ceNp2fVUwL0qOVkh1KWlVc0PNa/Ibn8 nC/DURIckoRsSlyqKS/2nRs2/qe9fumrcId145PetYA7q33sIawLsi8VDuunTxV08sXA vOAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qzRU3NjJ1d8c/C2020uLuMVnu7LuuPICJYaQN3jl9Co=; fh=b7pi59FcddbOkqjC/StRM3NasbmNqNndPp1vZL4laCM=; b=V9f/ajWK8EtOWuQ6G0Baiufic+ZkMTJ6DN+qwAqZhvyOEVnLFrs9r93FRyuBRU6BQy ST8v3esGljEBlCkNHeqKTuTKkFXEvHPu9Rqip3yIrbsEBZwABmmCImYVPHgiAZ1vbfus 19gQD7rVf14DOQ/fdIrUa0YvL4nSvc6N7QGm59/SHu5XfmfqDMCl9Ugs1EtkD+4HTRcu fRjidpGJaJRgd+x3xYkjE/y30e9RLF0smX3Y+KvHyF3vlFwyNHZA4JccF9+UrBxYN4rh SOYkkoegexhmT4MAwz9XI7x5m+JFWfaXzdTvTLxwM69plKsjrY6Hgk2bkPZrOhMVPRr8 qQjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XfgDWMe+; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-204121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c29c2182f1si991756a91.54.2024.06.06.04.05.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 04:05:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XfgDWMe+; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-204121-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8F560B25833 for ; Thu, 6 Jun 2024 10:40:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3BDE194AF1; Thu, 6 Jun 2024 10:40:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="XfgDWMe+" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3637013D28C; Thu, 6 Jun 2024 10:39:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717670402; cv=none; b=Y69aSqapJa+/7G8hgqm+48XMEUqZUX8w1zqYd4oq5JoNsZGFIX1/QBbG6c0eMZO6tOgu2hX6wB/RHjScvd7X0qXA+Cdj2iPwCBRvC0uiRb72dPBEW5QwoTvrC0ti31AvLdg7f/Crm+NlK2iTfTg3PzPOh+9CWuJomjbpVzZkSMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717670402; c=relaxed/simple; bh=0tpDrSbDB1WEN1VQ/gQejKZ3K7jqpkDNOQq66XzDTNU=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OOpsTBKO/lXN4wfJ0NBPk0qDW4BHmbBP0m6JSTmryvwCa94hRK/xDNhWUrSVSZeV96XeSngYTxV+kyEJSfzcwADQdVsC9IaNvt/gDuAcqKzH+l8AU4HZUiEU/eUmHd/uC2Fvx2/9RcuDi72xALPN1OvTuI/wxf4dvgYwCXM3244= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=XfgDWMe+; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 456Ad1ok093099; Thu, 6 Jun 2024 05:39:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1717670341; bh=qzRU3NjJ1d8c/C2020uLuMVnu7LuuPICJYaQN3jl9Co=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=XfgDWMe+BQyCpPRKKo/C86Fku2TS+SS/V4UKkHuNgaVvXBlkwRzYWDLpdnOeoG1Df 88wsCO4NciJyu+tAYaTqHLYvtP8etsj4rZYRrhX1eSRqFIhSL1TIEmraNT2M+q67P/ CMmCxbafjX3Vh1d0veRVVX+mlr8XP4f11VWswtxw= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 456Ad14c006785 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 6 Jun 2024 05:39:01 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 6 Jun 2024 05:39:01 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 6 Jun 2024 05:39:01 -0500 Received: from localhost (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 456Ad0SS128334; Thu, 6 Jun 2024 05:39:01 -0500 Date: Thu, 6 Jun 2024 16:08:59 +0530 From: Siddharth Vadapalli To: Manivannan Sadhasivam 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 , , , , , , , , , , , , Niklas Cassel Subject: Re: [PATCH 2/5] PCI: endpoint: Introduce 'epc_deinit' event and notify the EPF drivers Message-ID: <62430183-a413-454e-a485-a5347b80ce84@ti.com> References: <20240606-pci-deinit-v1-0-4395534520dc@linaro.org> <20240606-pci-deinit-v1-2-4395534520dc@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="us-ascii" Content-Disposition: inline In-Reply-To: <20240606-pci-deinit-v1-2-4395534520dc@linaro.org> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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. > > 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 Reviewed-by: Siddharth Vadapalli [...] Regards, Siddharth.