From patchwork Tue Jan 26 21:35:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12048373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34B9FC433E0 for ; Tue, 26 Jan 2021 21:36:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D36522053B for ; Tue, 26 Jan 2021 21:36:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D36522053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=QJ1ifpeIFVhGk3YhJ8FTdcexerIhXErYddNVG8XVtT4=; b=h5pkatgp20bb5HXx7pSddVx2/2 +IUZ+QS1A7tCd2XPA8pCrESxWM5DJSPy5aERPKbryNfFNuz1eizZDGuTtknEPFcUYSifG4Hn5xlkc /WqUHq1Oji+x7gOLqQKJPkXzXEmos3thlFWbtSDrNEcF0fP1CN8sG7LzkphkhWHQ1Q3REnkxChOv1 2bmV19zcnlIIbi1XnhEqN36Lkoo1sDAaVzL8kTHlIMEJsSuvQvrvg7qOVySzQsKBYDi9c5tp1HQ2W N05gxzuVBBzktqQ73oCrA21qLJl5cjxXGWzBRtYCx/y/QJMjIKVDnJYhlNu5MoqQZAibkwOp5Fgyq gqwZaAJQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4VzS-0001Lf-HP; Tue, 26 Jan 2021 21:35:10 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4VzQ-0001Ks-Gk for linux-arm-kernel@lists.infradead.org; Tue, 26 Jan 2021 21:35:09 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id F371420449; Tue, 26 Jan 2021 21:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611696907; bh=zcZQevOuYk1dSkQEEwXDEI9s1fVns2ruOe9zrnulgqk=; h=From:To:Cc:Subject:Date:From; b=Nr+cwa92DF8z6p8HS1r6Rc6IXemGULA3Soz5QiGkWo1zYdVzPd/roYSsZMI7/ghVd Lr6GZbEIc1UfcspRjC8cUBjUrZF3KS/JKtYZv6Bi3/ZVRvUsdX8MhWCxusjoUbBQrL Jnu8UC6QfaDhFkcxlDLrlL4mUz83a9D3BVB1hd8yyFY4yaYMwmNJ5Pda+MwvR0vKyc nZW/Z4+zZy4TyA1TsAYuBqmsEyzv1I4UFJF7RvzhSKQk2zk8UZfISZ1xeulD3QwrZC tGOPGDPPQJVz9KMAJLAz6HNEehxjZYky8GvrrgN+lC9cFUGtmjSWYdpCsWVsfxzmTk kHqGrN/QmyAqg== From: Bjorn Helgaas To: Toan Le , Lorenzo Pieralisi , Rob Herring Subject: [PATCH] PCI: xgene: Fix CRS SV comment Date: Tue, 26 Jan 2021 15:35:03 -0600 Message-Id: <20210126213503.2922848-1-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210126_163508_624897_B1E25275 X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bjorn Helgaas Configuration Request Retry Status ("CRS") must be supported by all PCIe devices. CRS Software Visibility is an optional feature that enables a Root Port to make CRS visible to software by returning a special data value to complete a config read. Clarify a comment to say that it is "CRS SV", not "CRS", that can be enabled. Signed-off-by: Bjorn Helgaas --- drivers/pci/controller/pci-xgene.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c index 85e7c98265e8..2afdc865253e 100644 --- a/drivers/pci/controller/pci-xgene.c +++ b/drivers/pci/controller/pci-xgene.c @@ -173,12 +173,13 @@ static int xgene_pcie_config_read32(struct pci_bus *bus, unsigned int devfn, /* * The v1 controller has a bug in its Configuration Request - * Retry Status (CRS) logic: when CRS is enabled and we read the - * Vendor and Device ID of a non-existent device, the controller - * fabricates return data of 0xFFFF0001 ("device exists but is not - * ready") instead of 0xFFFFFFFF ("device does not exist"). This - * causes the PCI core to retry the read until it times out. - * Avoid this by not claiming to support CRS. + * Retry Status (CRS) logic: when CRS Software Visibility is + * enabled and we read the Vendor and Device ID of a non-existent + * device, the controller fabricates return data of 0xFFFF0001 + * ("device exists but is not ready") instead of 0xFFFFFFFF + * ("device does not exist"). This causes the PCI core to retry + * the read until it times out. Avoid this by not claiming to + * support CRS SV. */ if (pci_is_root_bus(bus) && (port->version == XGENE_PCIE_IP_VER_1) && ((where & ~0x3) == XGENE_V1_PCI_EXP_CAP + PCI_EXP_RTCTL))