Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp120257rdb; Wed, 18 Oct 2023 21:44:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9liOf0jHccLXiLhV4qxPs67Pgaq9jVF4rB0Yq5dCAZiJrDPFV+jupv64cRZ3nQBhs6y2r X-Received: by 2002:a25:808d:0:b0:d92:13fc:c940 with SMTP id n13-20020a25808d000000b00d9213fcc940mr1399235ybk.9.1697690695763; Wed, 18 Oct 2023 21:44:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697690695; cv=none; d=google.com; s=arc-20160816; b=UKnawV9RQJE9NvgGcZUXvsMmIPYRDyw8SCaH7rMsUkXmPZGGhHyc4Az6IT8JWM6CEq 0JRPntWpdbG//GHxxqIe5zm63WGG9xFNKdn3XokUoJZVMi1CDiBuAftnQhRLoWvuAPbf yF/JD2OQ0Ls7ugKIRFL5fhJx+yUJfk7LmndIEKo0uLp5LBgy5dw7cWGxYVssBwrKsvEk VRnpbJ+GWgGMoA9K+js4cCJrdvonM7iXx6r6dmas8dWsNcWZKMggjc8w2RUnRwKekvUT lZKghASqj01yuLSVYTJdabeNhhOg+Az2uKzgyj4QDey19w1Vv3ABB6bzaQjvnSZbt4fb qKFQ== 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=Nsm65Fiol2e3YajEvGcp8ncLHLBMOOiaEhHW/ifzT4A=; fh=RWXv7XYDwaO1aSQjYy4HzDshRYY+7JnHB4G6ww0XlQQ=; b=njBHOZ2FRotXL7d2gU7iZT/7KB3gi2d+KkbThp5aPrqRqFUu8VxmdrVsPV2Z64FgJm bCncOeyFWbQTlwwpOXQV+PXH6tXiqN7sJ443G0BaHWxVyHKkME3ib6qNaTPA8po33JvS /I7M9LgIuoWgkoW7eMhDSV1OYD2DXieA8snXCffK0/aExUY0N5hvdBczbesfgWofg8hk jTAjXNgBip/IA5QF/HvvtBq3+iYyXFeHfhjYOW6/ZeqYRzx0PegX7cWef2wXpA/hYOLG P2rLhaUQRTUlL/KrbM7EEP2aTu9YSlmm6/+SizYRTZ/ofc4MjgRKeATULMBqIx0oDlRT 9RUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OZF5XvK6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id a192-20020a6390c9000000b005859e224619si3643371pge.786.2023.10.18.21.44.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 21:44:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OZF5XvK6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id E61458181BAA; Wed, 18 Oct 2023 21:44:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232529AbjJSEoo (ORCPT + 99 others); Thu, 19 Oct 2023 00:44:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229894AbjJSEom (ORCPT ); Thu, 19 Oct 2023 00:44:42 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2CDA121; Wed, 18 Oct 2023 21:44:40 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 39J4iTpu075127; Wed, 18 Oct 2023 23:44:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1697690669; bh=Nsm65Fiol2e3YajEvGcp8ncLHLBMOOiaEhHW/ifzT4A=; h=Date:CC:Subject:To:References:From:In-Reply-To; b=OZF5XvK6HnY3lGOXwzP6YLbwtuTKUmu54W7gfaRbMFnGjPacrcHv/IkbnvZQQ5ZWA YIIq5i0GWXSRmktAQ4xnW+wY2sIEnU6Sg6ROjlZ+kBcQn2J9f2s+IW7dxFwoXSNOPh pbrkh0fBIK0VM0VzydQQtzpe6GOJLPK8oMj2BQXA= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 39J4iTvW083272 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Oct 2023 23:44:29 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 18 Oct 2023 23:44:29 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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 via Frontend Transport; Wed, 18 Oct 2023 23:44:29 -0500 Received: from [172.24.227.9] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 39J4iPhO008594; Wed, 18 Oct 2023 23:44:25 -0500 Message-ID: <6842cdf9-d73b-4895-891f-993eaf5bee6e@ti.com> Date: Thu, 19 Oct 2023 10:14:24 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird CC: , , , , , , , , , Serge Semin , Subject: Re: [PATCH v2] PCI: keystone: Fix ks_pcie_v3_65_add_bus() for AM654x SoC Content-Language: en-US To: Bjorn Helgaas References: <20231018163632.GA1364574@bhelgaas> From: Siddharth Vadapalli In-Reply-To: <20231018163632.GA1364574@bhelgaas> 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=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 pete.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 (pete.vger.email [0.0.0.0]); Wed, 18 Oct 2023 21:44:53 -0700 (PDT) Hello Bjorn, On 18/10/23 22:06, Bjorn Helgaas wrote: > [+cc Serge (please cc people who have commented on previous revisions)] Sure, I will do so. > > On Wed, Oct 18, 2023 at 01:20:38PM +0530, Siddharth Vadapalli wrote: ... >> >> Changes since v1: >> - Updated patch subject and commit message. >> - Determined that issue is not with the absence of Link as mentioned in >> v1 patch. Even with Link up and endpoint device connected, if >> ks_pcie_v3_65_add_bus() is invoked and executed, all reads to the >> MSI-X offsets return 0xffffffff when pcieport driver attempts to setup >> AER and PME services. The all Fs return value indicates that the MSI-X >> configuration is failing even if Endpoint device is connected. This is >> because the ks_pcie_v3_65_add_bus() function is not applicable to the >> AM654x SoC which uses DW PCIe IP-core version 4.90a. > > Thanks for verifying that this doesn't actually depend on whether the > link is up. > > I think that means we should be able to get rid of the > ks_pcie_v3_65_add_bus() callback altogether and instead do this along > with the rest of the Root Port init. Yes, I will follow Serge's suggestion of adding a new pci_ops structure for the AM654x SoC which uses the new 4.90a controller. I have described it at: https://lore.kernel.org/r/ba217723-1501-4e72-b143-e0047266ea9a@ti.com/ and am summarizing it below: I will add the following: static struct pci_ops ks_pcie_am6_ops = { .map_bus = dw_pcie_own_conf_map_bus, .read = pci_generic_config_read, .write = pci_generic_config_write, }; which shall be used for AM654x SoC I will also modify the contents of ks_pcie_host_init() as follows: if(ks_pcie->is_am6) pp->bridge->ops = &ks_pcie_am6_ops; else pp->bridge->ops = &ks_pcie_ops; which will ensure that the .add_bus() method is no longer applicable to the AM654x SoC, which was the case prior to commit 6ab15b5e7057. I shall post the v3 patch with the above changes and also Cc Serge. -- Regards, Siddharth.