From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE8E5C433F5 for ; Tue, 19 Oct 2021 09:05:59 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 333DA60FED for ; Tue, 19 Oct 2021 09:05:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 333DA60FED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E687782128; Tue, 19 Oct 2021 11:05:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="i4r8/QIC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DB32181F0D; Tue, 19 Oct 2021 11:05:54 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 820DA81F74 for ; Tue, 19 Oct 2021 11:05:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 00EDC60FED; Tue, 19 Oct 2021 09:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634634349; bh=ff1lkU52nGl0RD684VePFLRKwyU7RawSpI0YdmWK+5Q=; h=From:To:Cc:Subject:Date:From; b=i4r8/QICtEW3llVUs5mii0FUjNQbGYKpgufQUJOflW4KTzosAa+ZjOeVAmWjnFFfg GA3kfd1wzeeSn8+FhaOevA2yAeLv5+pYbqBicrVFEhs3u9AhGfa1rSNXxN5aZZOHOA 8FgcDDAtAcWyWwhBJs+VhY/59Ef7+1D5cv0zXnEzkpK3pBfSnviBzVAI54KeCcmo6/ 5e/6PUvJxd/aU0wQx/7QZAXnzJPAoo88TIDM2KgOekFw7g1u9nhBVg7XqeTB78deeS NoxT1zl4h/p/77PnqHSra2HMCYvrSBliwf0qwPDyGPy8TX65krjpJXxUGcKvJ3W2KL eW7ut7txNFpkw== Received: by pali.im (Postfix) id 6A2F4AC1; Tue, 19 Oct 2021 11:05:46 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese Cc: Konstantin Porotchkin , u-boot@lists.denx.de Subject: [PATCH] arm: a37xx: pci: Fix condition for CRS response Date: Tue, 19 Oct 2021 11:05:01 +0200 Message-Id: <20211019090501.25572-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean As stated in comment above the code, CRS response can be returned to OS only for 4-byte PCI_VENDOR_ID config read request. So fix the code. Fixes: 1d7ad68559e2 ("arm: a37xx: pci: Handle propagation of CRSSVE bit from PCIe Root Port") Signed-off-by: Pali Rohár --- drivers/pci/pci-aardvark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c index ade5ab056f84..9e623b6e617b 100644 --- a/drivers/pci/pci-aardvark.c +++ b/drivers/pci/pci-aardvark.c @@ -445,7 +445,7 @@ static int pcie_advk_read_config(const struct udevice *bus, pci_dev_t bdf, * for returning CRS, so that if U-Boot does support CRS in the future, * it will work for Aardvark. */ - allow_crs = pcie->cfgcrssve; + allow_crs = (offset == PCI_VENDOR_ID) && (size == PCI_SIZE_32) && pcie->cfgcrssve; if (advk_readl(pcie, PIO_START)) { dev_err(pcie->dev, -- 2.20.1