Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3232207lqp; Tue, 26 Mar 2024 03:38:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXLOO7nGCtqrypGn49HMMoOSoheHf4G0Wv+8be1Vx8ARNvBMAJb3/aemsauZNsNhFj8uVeZAlB8ERFsxgWklQwLEOOTuK+d3CaGEuMeiQ== X-Google-Smtp-Source: AGHT+IHgUy4097oJIIvM0apkmxgwP4SloCxZV9FvvWz/PBu7DIijpH+uwf2x7f93x8g0eFtVduhP X-Received: by 2002:a17:90b:400d:b0:29e:460:47a3 with SMTP id ie13-20020a17090b400d00b0029e046047a3mr7276368pjb.12.1711449482623; Tue, 26 Mar 2024 03:38:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711449482; cv=pass; d=google.com; s=arc-20160816; b=h+521zLziIxT3rXW8dPw83NikhG022UXRzQLQ4oNGg3Wv49HJ4EQOJTpctQ6iksQOU R9OjhTZZJW3qPDuULf49V97lcyQqHXp6fpjqVsKwg/RIIY3UCPW48zoI/LNkNa8mBVhd 2zECwMbxkrinxtliUGJ1au97iCiv2XRM6QjuNIA4qnGipOZS1YwPEHslLU4ZACCHe6sM lhs370oDwlI0sVH6sK64+mHBAiI3OmoJU44KLzeNWAs5V6aSIBG/6/ozcjZLZAaN/z0V SjZADJ88LG+iFFh+1T2nnwkJowwAI22CqTFl7NR7d2OJDOOCedgB9SGc5mhQVeq7ygxb WABQ== 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=z00kFQgQftOWss4GWsQx6Jv4zwO0RflYwNrwzMGG5qg=; fh=0tIhEViLo7PUpyJI/8YvAfn7aU9qwVOIrJ6jkc06K5o=; b=zia5leoeK43p8539oOqmDDlCGPj9BZfHTaHqQ4aCBOOH9O8mMEMK/HCFCctXgouzf1 VXx3sNR7itjJ5kRlIzz4yAgN3GhFDe19nspZqccT/BwAMS937fb0mgvztn7WgVpC1aQW pSeWOwaeAPtLit2Lj8FDKJthLWh+ygSCncZdaW2B7Ck4hqWMeoryyoohURuNDXYlQZn0 ZiALOKI32wDxwTGtaoiAOASf4+GGN7fW4H8js7+ociQAONKp+EPnqk0dyzgZRB0MG1FG /IzZ34gSPh+3ZND4oV2ipyhHI3bRe8gsU8sXOb4yKZ0XKctm5wW6/TQum7TAtaH/z6A4 8YMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XIOgLcin; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-118819-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118819-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id rj12-20020a17090b3e8c00b002a00af7d6d2si9821209pjb.97.2024.03.26.03.38.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 03:38:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118819-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=@kernel.org header.s=k20201202 header.b=XIOgLcin; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-118819-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118819-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 26BE22E7D60 for ; Tue, 26 Mar 2024 10:38:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A86912B95; Tue, 26 Mar 2024 10:37:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XIOgLcin" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EBFFD748A; Tue, 26 Mar 2024 10:37:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711449452; cv=none; b=W+/w/NyByAbk1vzJKKPIYCdzOohsMMNlOamtPIvbJ+C6i1+UmteclnM39I+2dm+qzOyZ+wo+ILFL1ldO6vZaOWwkEyXHVDIM98WltPhv2XQeMmamjzK7OxlyU4Fu1W6UjkquWhYZcIh4P5bkQybQwNSsqNO2PirYWmevQzXrzY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711449452; c=relaxed/simple; bh=aNOwmWd+mF/9qimz0zNFCCBFCUwOQRmpJaxlHlvMnnc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f8F1LhlAhtJqGoJemYA6Vaj5zv3HTbyZwtDkWmZsm9r91bhTXwWbdXeXU7ubuQuXr0VwHJXcLBmYy0+HiIcxFg8aM7oMM5jz5S+np0hp1aCXGBtBZTNMH+Am0jiZURy61/Jihw7Ady4dXrN5EhAG+9UsQwTdvpbsUTiFvw9YRAY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XIOgLcin; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42E18C433F1; Tue, 26 Mar 2024 10:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711449451; bh=aNOwmWd+mF/9qimz0zNFCCBFCUwOQRmpJaxlHlvMnnc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XIOgLcinpEW/3DD10dKAmt20XSXw/wj2ovE7KJ+luqJH8KeQLkI4WIiONF3PbzjZM kmrN0WnM2jAVQeBqDEsCS1AHiPCAuTIILET97TDFdWiqpHA5sXhijYWgM9LjRvFuK3 W8YaQsr+nAezIsRM/s0VEIBom9jn/rY+Ivt9UFSRsXnKPQ7mkdrj/gXQNCPpOYc5Ts F06tgwJDSPfn2FxKugm6mczz/segB1UmYiSkXJvhHcGUidyMNj8eMfL9p5/S0xQ4Ij 05yQ1+4IWRXCDl4/E7t805EFCN7afgtUN8/W99o4ZaQOF31CKivlKVMUXO6xsfDAN6 TPrDcunPxK0gg== Date: Tue, 26 Mar 2024 11:37:25 +0100 From: Niklas Cassel To: Manivannan Sadhasivam Cc: Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Kishon Vijay Abraham I , Thierry Reding , Jonathan Hunter , Jingoo Han , Gustavo Pimentel , linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, mhi@lists.linux.dev, linux-tegra@vger.kernel.org Subject: Re: [PATCH 01/11] PCI: qcom-ep: Disable resources unconditionally during PERST# assert Message-ID: References: <20240314-pci-epf-rework-v1-0-6134e6c1d491@linaro.org> <20240314-pci-epf-rework-v1-1-6134e6c1d491@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: <20240314-pci-epf-rework-v1-1-6134e6c1d491@linaro.org> On Thu, Mar 14, 2024 at 08:53:40PM +0530, Manivannan Sadhasivam wrote: > All EP specific resources are enabled during PERST# deassert. As a counter > operation, all resources should be disabled during PERST# assert. There is > no point in skipping that if the link was not enabled. > > This will also result in enablement of the resources twice if PERST# got > deasserted again. So remove the check from qcom_pcie_perst_assert() and > disable all the resources unconditionally. > > Fixes: f55fee56a631 ("PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver") > Signed-off-by: Manivannan Sadhasivam > --- > drivers/pci/controller/dwc/pcie-qcom-ep.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c > index 2fb8c15e7a91..50b1635e3cbb 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c > +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c > @@ -500,12 +500,6 @@ static int qcom_pcie_perst_deassert(struct dw_pcie *pci) > static void qcom_pcie_perst_assert(struct dw_pcie *pci) > { > struct qcom_pcie_ep *pcie_ep = to_pcie_ep(pci); > - struct device *dev = pci->dev; > - > - if (pcie_ep->link_status == QCOM_PCIE_EP_LINK_DISABLED) { > - dev_dbg(dev, "Link is already disabled\n"); > - return; > - } > > dw_pcie_ep_cleanup(&pci->ep); > qcom_pcie_disable_resources(pcie_ep); > > -- > 2.25.1 > It would be nice if you could do a similar change to pcie-tegra, so that the drivers are in sync, as that is not strictly related: Reviewed-by: Niklas Cassel