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 E0A61C433F5 for ; Wed, 20 Oct 2021 09:51:43 +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 65BE961378 for ; Wed, 20 Oct 2021 09:51:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 65BE961378 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 5D74283347; Wed, 20 Oct 2021 11:51:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1634723501; bh=UlpYYlte7M+Ph54L5x1QL0i1QbEHLFIzR/nL97PUATw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ghe7y1Bvk+7CVQaJhjfVmjKyvlOgiR72Gw+NA5jLNHtglIfNT1CIug+0zXLUkoOqu yXQ+raYOR8QA0eztPKvibGPqmI+QM9gLH8rL25Tij3sIJYNZUwzIYyLxDJqWA1WpiG /+/dq0BW8AJwpw3Eti+pVrqhsZzeGSc68l+fvEcW8EMppfOin76uwnqcdanaXCoFqL Jv6GnoDKJwSq942XRUP9bK6h06WaRKg2kJRSPMR4sKpuTvn8kq0HlYh1Uhs7vJIsyL G6QZcQ4ypDp1bJhGX619mZcr1HtFyqmRcYbWztqI3ey/k1xi/CWlwhmP1mi5krJisR /g8nODHl71CWQ== Received: by phobos.denx.de (Postfix, from userid 109) id F347B8337C; Wed, 20 Oct 2021 11:51:38 +0200 (CEST) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [91.198.250.252]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CBD5A83276 for ; Wed, 20 Oct 2021 11:51:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4HZ5VH2gFxzQk99; Wed, 20 Oct 2021 11:51:35 +0200 (CEST) Subject: Re: [PATCH] arm: a37xx: pci: Fix condition for CRS response To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: Konstantin Porotchkin , u-boot@lists.denx.de References: <20211019090501.25572-1-pali@kernel.org> From: Stefan Roese Message-ID: Date: Wed, 20 Oct 2021 11:51:31 +0200 MIME-Version: 1.0 In-Reply-To: <20211019090501.25572-1-pali@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 253A8181B 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 On 19.10.21 11:05, Pali Rohár wrote: > 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 Reviewed-by: Stefan Roese Thanks, Stefan > --- > 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, > Viele Grüße, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de