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 X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 B912EC47247 for ; Thu, 30 Apr 2020 20:32:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 8400E20731 for ; Thu, 30 Apr 2020 20:32:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="liViazga"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="zd5B1ASe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8400E20731 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+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=gx3UXxnHIv+jYygnTdZ9XPUsBjIFdz2v6wBiYLuCGBE=; b=liViazgai914h1 sAV3a8bUD927mSdD1Adc994wboO6Qf60f/bQkQQkoytN4/blfyvu2G8WaHuA+xU4lS9qtGSEv7UK2 1knkzYjr8zVwPrAAAOUdCCe5qcswkLOVN1dgZCZA0bsUvQbrKNaRClQmjgCi+WvHb/RXtBYwGrO9X +g6OPHmCXZKW0IWI5vqEt8XyrZ+1EFkIl3OfIdpGxgXojU7OYbNQ1f3KcHPX/GJbQKUMVpmvlJmgx GCCk92iP9UWK5HAAIradmmfu4MqSD9C19e/hn2cpphC0yj1fdtiTCWzjUbAxPOWPhDrFt9P88V31u OdlQ/66BdrItYzlXWngw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUFre-00059v-0v; Thu, 30 Apr 2020 20:32:58 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUFrb-00059M-CK; Thu, 30 Apr 2020 20:32:56 +0000 Received: from localhost (mobile-166-175-184-168.mycingular.net [166.175.184.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 630C020731; Thu, 30 Apr 2020 20:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588278774; bh=zzOnZ2B7AsiXDdVWneijt0yscUPJzfIVROepioX7gdA=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=zd5B1ASeI/cKNjmR9Kf5s0atSdNzjmUWfNULcGEiUguAUlByj0/PuGPATMJIx9jHv WCAH+L+iFs5BnjP2mGyb5l94EBqey4Zj0mSzBEZGBt1rtwBurlaMNpQ4opqZkzjKPx C3AKyYptt/ieWhnd4glH2ZPvpWjAI2QT7vwx6c+w= Date: Thu, 30 Apr 2020 15:32:52 -0500 From: Bjorn Helgaas To: Jim Quinlan Subject: Re: [PATCH 3/5] PCI: brcmstb: enable CRS Message-ID: <20200430203252.GA62266@bjorn-Precision-5520> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200430185522.4116-3-james.quinlan@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200430_133255_461090_38F91208 X-CRM114-Status: GOOD ( 17.22 ) 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: "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Rob Herring , Lorenzo Pieralisi , "open list:PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS" , open list , Florian Fainelli , "maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Bjorn Helgaas , Nicolas Saenz Julienne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 30, 2020 at 02:55:20PM -0400, Jim Quinlan wrote: > From: Jim Quinlan > > Configuration Retry Request Status is off by default on this > PCIe controller. Turn it on. Are you talking about CRS itself, i.e., the ability of a Root Port to deal with Completions with Configuration Retry Request Status? That really shouldn't be switchable in the hardware since it's a required feature for all PCIe devices. Or are you talking about CRS Software Visibility, which is controlled by a bit in the PCIe Root Control register? That *should* be managed by the PCI core in pci_enable_crs(). Does that generic method of controlling it not work for this device? It looks like maybe the latter, since the generic: #define PCI_EXP_RTCTL_CRSSVE 0x0010 matches your new PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL_RC_CRS_EN_MASK. If pci_enable_crs() doesn't work on this device, it sounds like a hardware defect that we need to work around, but I'm not sure that just enabling it unconditionally here is the right thing. > Signed-off-by: Jim Quinlan > --- > drivers/pci/controller/pcie-brcmstb.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c > index 5b0dec5971b8..2bc913c0262c 100644 > --- a/drivers/pci/controller/pcie-brcmstb.c > +++ b/drivers/pci/controller/pcie-brcmstb.c > @@ -34,6 +34,9 @@ > #define BRCM_PCIE_CAP_REGS 0x00ac > > /* Broadcom STB PCIe Register Offsets */ > +#define PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL 0x00c8 > +#define PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL_RC_CRS_EN_MASK 0x10 > + > #define PCIE_RC_CFG_VENDOR_VENDOR_SPECIFIC_REG1 0x0188 > #define PCIE_RC_CFG_VENDOR_VENDOR_SPECIFIC_REG1_ENDIAN_MODE_BAR2_MASK 0xc > #define PCIE_RC_CFG_VENDOR_SPCIFIC_REG1_LITTLE_ENDIAN 0x0 > @@ -827,6 +830,12 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie) > pci_speed_string(pcie_link_speed[cls]), nlw, > ssc_good ? "(SSC)" : "(!SSC)"); > > + /* Enable configuration request retry (CRS) */ > + tmp = readl(base + PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL); > + u32p_replace_bits(&tmp, 1, > + PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL_RC_CRS_EN_MASK); > + writel(tmp, base + PCIE_RC_CFG_PCIE_ROOT_CAP_CONTROL); > + > /* PCIe->SCB endian mode for BAR */ > tmp = readl(base + PCIE_RC_CFG_VENDOR_VENDOR_SPECIFIC_REG1); > u32p_replace_bits(&tmp, PCIE_RC_CFG_VENDOR_SPCIFIC_REG1_LITTLE_ENDIAN, > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel