Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2919048rdg; Mon, 16 Oct 2023 21:16:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3f4APe6AqO9ZVW7jlxC27JSw963vFLndFt9UOAYws9dlYle+BOqLT3zHnQ3W+MtJMuTlH X-Received: by 2002:a05:6a20:8419:b0:17a:d72a:629c with SMTP id c25-20020a056a20841900b0017ad72a629cmr1195091pzd.37.1697516174432; Mon, 16 Oct 2023 21:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697516174; cv=none; d=google.com; s=arc-20160816; b=GNDv/lXNHGA3bShsrlGdHlMhTSuYr2HGl+9PnBWud3Vsq7+mjL14Ge9wRFAhQk3rvW g6eNRF4AyHuWCum32w4F2obh5bcPr3SVLUvxlJblX5BzABqUdYN3q/xvoSksiOyUw3GR PghZjBccLoMkaZZ5uMdxXcno/9kYios0YUy2YKy090MYVO0FuRB22JlaOghuyQf98C/f LEEx/DP20WSqfq2Q9I29xjw4jFe6eZjmffNuSBp9XyxIljW0Q2bWalQwBKiT7TZfDp+5 6R1GcuZnNwm7M/ztjWewPoUpncmEMRXJFRTvS5Sa2ZnAfoMf8GlmHHsL6k85y/Vh3HPI yp5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=oL7oHmZvkQOudY/B18BQOXJfuksRsqH0MmTfTp0ufSU=; fh=BAr2OAoc5yPxYM0ay+v7uwLfg/eOEi4z20nO53/zkxM=; b=JZml5k1BBUv8YEmxrlf9ftW4JORLRzkhe29SHiiEO6RiDH4M0cM9PS2/BgL4ruvB+a t3rWmWU74RxZXdAjd32xhHFd2nulk2idurcmSvS8tqMDHBAwQPQlD1QFFHzZgerVhmk1 9QynboU2PlYkAU6oPVqevY9lomVKcLqbJoaRdq4VYEd5Xv3+NKXzEqpMN5oKM3iNBW5Z XrW9GVWGMuljZJV1/tRS92qutTg0L9igy6DiXFhCzJAzWvofD3v36UdW04ab4Z6g4hnO Vre2tGokKH5XiTVWEskCE5zr2PgDlnUonr2WZqTF/4UZZoid4DkAvq+67rN1OsMcJ77F DI0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NwzS2DJx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id oo6-20020a17090b1c8600b0026800178358si904642pjb.144.2023.10.16.21.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 21:16:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NwzS2DJx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 3E85B807245A; Mon, 16 Oct 2023 21:15:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbjJQEPR (ORCPT + 99 others); Tue, 17 Oct 2023 00:15:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234086AbjJQEPP (ORCPT ); Tue, 17 Oct 2023 00:15:15 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 600AC9F; Mon, 16 Oct 2023 21:15:13 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 39H4EtRE028919; Mon, 16 Oct 2023 23:14:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1697516095; bh=oL7oHmZvkQOudY/B18BQOXJfuksRsqH0MmTfTp0ufSU=; h=Date:CC:Subject:To:References:From:In-Reply-To; b=NwzS2DJxudKY5XMCJWV00/RH233dmq3VUrmlM6zNpRn0bKM2MVak1A+uLErpDPPC7 qXOEShq9PrMrot5mCEhHj56mIeaFvTv9gRo0DMi648rRV/Rk1a1dljzyLHRdLcClLm fmVb42seBEnMYvOZXi+W6z83Yz/czRRvWHOyYxuQ= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 39H4EtHG121910 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Oct 2023 23:14:55 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 16 Oct 2023 23:14:55 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 16 Oct 2023 23:14:55 -0500 Received: from [172.24.227.9] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 39H4EpJq007105; Mon, 16 Oct 2023 23:14:52 -0500 Message-ID: Date: Tue, 17 Oct 2023 09:44:51 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 CC: Bjorn Helgaas , , , , , , , , , , Subject: Re: [PATCH] PCI: keystone: Don't enable BAR0 if link is not detected Content-Language: en-US To: Serge Semin References: <20231013184958.GA1118393@bhelgaas> From: Siddharth Vadapalli In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 21:15:25 -0700 (PDT) Hello, On 17/10/23 02:59, Serge Semin wrote: > Hi Siddharth > ... >>> >>> I assume MSI-X actually does work for downstream endpoints? I >>> wouldn't think anybody would have bothered with >>> ks_pcie_v3_65_add_bus() unless MSI-X works. >> >> Yes, I think it is supposed to work, but it doesn't seem to be working right now >> considering that even with Endpoint device connected, the readl() returns all Fs. > > Could you please have look at what DW PCIe IP-core version is utilized > in the Keystone PCIe host controller? If it's of v5.x then here is The DW PCIe IP-core version is 4.90a. > what HW databook says about the BARs initialization: "If you do use a > BAR, then you should program it to capture TLPs that are targeted to > your local non-application memory space residing on TRGT1, and not for > the application on TRGT0 (dbi). The BAR range must be outside of the > three Base/Limit regions." Yes, it's the same even in the DW PCIe IP-core version 4.90a Databook: 3.5.7.2 RC Mode Two BARs are present but are not expected to be used. You should disable them or else they will be unnecessarily assigned memory during device enumeration. If you do use a BAR, then you should program it to capture TLPs that are targeted to your local non-application memory space residing on TRGT1, and not for the application on TRGT1. The BAR range must be outside of the three Base/Limit regions. > > I have no idea whether the BAR being set with an address within the > Base/Limit regions could have caused the lags you see, but I would > have at least checked that. I will check that. Thank you for sharing your feedback. > > -Serge(y) > >> >> -- >> Regards, >> Siddharth. -- Regards, Siddharth.