Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp78630lqo; Wed, 15 May 2024 22:38:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQF6Q6V274RgzSLae8/ByY2t3ky2xVitOS0v9UaxIAHtb0QOtzlgkcfXt0fnDWTzwQ4U/OcGZUGAyF1FiY2tZzIRX0M8GxWBsMKxO2Xw== X-Google-Smtp-Source: AGHT+IGxGNs7mkNxm0oO0di9FaXU9VPDtzqFtIjlxLc7+v2MqL2Hrb1tc4Jtvz9xWIZJCxr+8khD X-Received: by 2002:a25:c7c9:0:b0:dce:1285:e9a5 with SMTP id 3f1490d57ef6-dee4f1b7c85mr17036395276.11.1715837891340; Wed, 15 May 2024 22:38:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715837891; cv=pass; d=google.com; s=arc-20160816; b=rIzKdeIXs9LuTCnrR6SUOZj0wWO6fnj/INBBDMWXxRPaJRd+b4hI/Warw6m3PlVaqF Thfweh51JmtdPX2eaVHeV4+mjpm4TAizxEuWc5KqOZvVAwjIM5PQCDQq6XPplv7R/HO+ kGF3wnixHthIMbn1R0szsCYOZw2AT1ESJVEleVUUYLI33TOLBtLhlm6SPxE8agDIqxo2 Xnd0gV1V/fG/T/MDIkgK9Q9fpNzVhheguB8hbReyZ2V0a7+VtrccRAL0/fqiyZox6JVF eCprYSVrxfZ+AhKmJ2JqK5y4tBDWmy5hGr+OMNj8GK0yHqGWydbsJMWNA7QCFOR5UY7o M6mw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Y+0+gVcTYlTJ4NuM6emf0ej+bmnF17XCG4Y5MCExeEM=; fh=SPw2a/bkUfTbiw/bh72X9udpjNFWw39o/JDfNyDmjmM=; b=C5Vw6mGa+7PgTVGKL+mNal+Xnk4hvQuIhdYralbrSKijXEVxzQzY5xBuZv9/lVYEh/ MOEBKKg8I0xa0rntutL4qqLJ6iTPO51Q31M4iaKLXLq4IGHdsrEnZ/SCmJSOjDBYKSb3 7C5lMTSMWuddGiDEpDFMoFSS+ZmFX4Is1HgRjm2Tu1zj0KREdzUH8DortsMLIEHQb0s8 30VYNHrlnb4AapLT1DN7YLCygSQOli64oQ0h1T6touYkMW1qDKPiI4Ca4A30Xchk0nqq srnVSksoKpi7VUzH2f07vzY4QODF8OLJTLOa1YnI4EjKyfBfTk4McHTR7witaqLcCQP2 bJAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=M0fIfb+v; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-180653-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180653-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2eefb0si13553716d6.470.2024.05.15.22.38.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 22:38:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180653-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=M0fIfb+v; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-180653-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180653-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 152891C21153 for ; Thu, 16 May 2024 05:38:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9AC031D54B; Thu, 16 May 2024 05:38:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="M0fIfb+v" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1FAC10A23; Thu, 16 May 2024 05:38:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715837883; cv=none; b=uN4C3xOgr1SCWL73Y/f30EpZhOgBy3WkSyxZhp88NTY0Vdf5GcuVoQj/MfGkLxy1/C3NJWCSUrJuODiJTTbOsofOXLDtDPzJWIVSA9e+aT7Gl1mKj26nxaAI7dSoc05WjU+/xxer03fZLsSIVXULRCWlxINUHmJejF/cxjYRZ/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715837883; c=relaxed/simple; bh=+x9P2g10w13sFtsPvEkQvrH5zn5tUCuZy9wdbJMlwyw=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=q1r28qMCDKM36qDQO0P3EUaSvAoj88oJFtKJ8X4nZmS+zp6zF1MECVblEojGNcFFd3mFQGCtsDHlYkldMluuCoXC0FRWrFihDfTqSB3cB18wu2D35BkEdSDSbSZsUE7fpHeJgZPNKAhI2AhzhtqEWWHkPGLCkiUL58Yh1fzf8VI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=M0fIfb+v; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44G5bTiY107053; Thu, 16 May 2024 00:37:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1715837849; bh=Y+0+gVcTYlTJ4NuM6emf0ej+bmnF17XCG4Y5MCExeEM=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=M0fIfb+vug0ndmHZykTjjoy+wJnfkyjq5jD7Zk9UPyIXNuJooZJbfUKs1yR41eR4h 1Zc3eAm8Dj8wh5bETHru5KCxzrUZ39tKExNVgtPnB9NJH6ee1tzqSLpz18GZyu85wO uDJJ9Hcx7qRwOzSH/77e6PQ8RBlzHaZjOcMH+4iw= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44G5bTS3063310 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 16 May 2024 00:37:29 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 16 May 2024 00:37:28 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE103.ent.ti.com (10.64.6.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; Thu, 16 May 2024 00:37:28 -0500 Received: from localhost (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44G5bSjM068377; Thu, 16 May 2024 00:37:28 -0500 Date: Thu, 16 May 2024 11:07:27 +0530 From: Siddharth Vadapalli To: Bjorn Helgaas CC: Siddharth Vadapalli , , , , , , , , , , , , , , Subject: Re: [PATCH v7 2/2] PCI: keystone: Fix pci_ops for AM654x SoC Message-ID: References: <20240514211452.GA2082543@bhelgaas> <20240515192614.GA2133406@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240515192614.GA2133406@bhelgaas> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On Wed, May 15, 2024 at 02:26:14PM -0500, Bjorn Helgaas wrote: > On Tue, May 14, 2024 at 04:14:54PM -0500, Bjorn Helgaas wrote: > > On Tue, May 14, 2024 at 05:41:48PM +0530, Siddharth Vadapalli wrote: > > > On Mon, May 13, 2024 at 04:53:50PM -0500, Bjorn Helgaas wrote: > > ... > > > > > I'm not quite clear on the mechanism, but it would be helpful to at > > > > least know what's wrong and on what platform. E.g., currently v4.90 > > > > suffers Completion Timeouts and 45 second boot delays? And this patch > > > > fixes that? > > > > > > Yes, the Completion Timeouts cause the 45 second boot delays and this > > > patch fixes that. > > > > And this problem happens on AM654x/v4.90a, right? I really want the > > commit log to say what platform is affected! > > > > Maybe something like this? > > > > PCI: keystone: Enable BAR 0 only for v3.65a > > > > The BAR 0 initialization done by ks_pcie_v3_65_add_bus() should > > happen for v3.65a devices only. On other devices, BAR 0 should be > > left disabled, as it is by dw_pcie_setup_rc(). > > > > After 6ab15b5e7057 ("PCI: dwc: keystone: Convert .scan_bus() > > callback to use add_bus"), ks_pcie_v3_65_add_bus() enabled BAR 0 for > > both v3.65a and v4.90a devices. On the AM654x SoC, which uses > > v4.90a, enabling BAR 0 causes Completion Timeouts when setting up > > MSI-X. These timeouts delay boot of the AM654x by about 45 seconds. > > > > Move the BAR 0 initialization to ks_pcie_msi_host_init(), which is > > only used for v3.65a devices, and remove ks_pcie_v3_65_add_bus(). > > I haven't heard anything so I amended it to the above. But please > correct me if it's wrong. I would suggest specifying the failing combination since I do not know if there is another device that is using v4.90a but doesn't see this issue. What is certain is that this issue is seen with the v4.90a controller on AM654x platform. Despite the PCIe Controller version remaining the same across different platforms, it might be possible that not all features supported by the PCIe Controller are enabled on all platforms. For that reason, it appears to me that the subject could be: PCI: keystone: Don't enable BAR 0 for AM654x which implicitly indicates the combination as well (v4.90a on AM654x). The commit message's contents could be reduced to: After 6ab15b5e7057 ("PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus"), ks_pcie_v3_65_add_bus() enabled BAR 0 for both v3.65a and v4.90a devices. On the AM654x SoC, which uses v4.90a, enabling BAR 0 causes Completion Timeouts when setting up MSI-X. These timeouts delay boot of the AM654x by about 45 seconds. Move the BAR 0 initialization to ks_pcie_msi_host_init(), which is only used for v3.65a devices, and remove ks_pcie_v3_65_add_bus(). by dropping: The BAR 0 initialization done by ks_pcie_v3_65_add_bus() should happen for v3.65a devices only. On other devices, BAR 0 should be left disabled, as it is by dw_pcie_setup_rc(). The reason behind dropping the above paragraph is that BAR 0 could probably be enabled on other controller versions as well, but not on the v4.90a controller on the AM654x SoC. Thank you Bjorn, for enhancing the commit message. Regards, Siddharth.