From patchwork Thu Dec 5 05:44:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jay Agarwal X-Patchwork-Id: 3286441 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8D2889F373 for ; Thu, 5 Dec 2013 05:45:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B59820515 for ; Thu, 5 Dec 2013 05:45:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9696E20457 for ; Thu, 5 Dec 2013 05:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751731Ab3LEFps (ORCPT ); Thu, 5 Dec 2013 00:45:48 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:12477 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751222Ab3LEFpr convert rfc822-to-8bit (ORCPT ); Thu, 5 Dec 2013 00:45:47 -0500 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com id ; Wed, 04 Dec 2013 21:45:45 -0800 Received: from hqemhub02.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Wed, 04 Dec 2013 21:42:46 -0800 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Wed, 04 Dec 2013 21:42:46 -0800 Received: from HQMAIL103.nvidia.com (172.20.187.11) by hqemhub02.nvidia.com (172.20.150.31) with Microsoft SMTP Server (TLS) id 8.3.327.1; Wed, 4 Dec 2013 21:45:47 -0800 Received: from HQMAIL103.nvidia.com (172.20.187.11) by HQMAIL103.nvidia.com (172.20.187.11) with Microsoft SMTP Server (TLS) id 15.0.712.24; Wed, 4 Dec 2013 21:45:17 -0800 Received: from bgemhub01.nvidia.com (10.25.128.13) by HQMAIL103.nvidia.com (172.20.187.11) with Microsoft SMTP Server (TLS) id 15.0.712.24 via Frontend Transport; Wed, 4 Dec 2013 21:45:17 -0800 Received: from BGMAIL01.nvidia.com ([10.25.128.15]) by bgemhub01.nvidia.com ([10.25.140.46]) with mapi; Thu, 5 Dec 2013 11:14:53 +0530 From: Jay Agarwal To: "linux-pci@vger.kernel.org" , 'Bjorn Helgaas' , "'yinghai@kernel.org'" CC: Stephen Warren , Thierry Reding , Krishna Thota Date: Thu, 5 Dec 2013 11:14:53 +0530 Subject: [Discussion]: ARM: PCIE: Setup bridges not happening with portbus driver enabled Thread-Topic: [Discussion]: ARM: PCIE: Setup bridges not happening with portbus driver enabled Thread-Index: Ac7xe7eo5DpyTARzQPS5Do7GZAoXDQ== Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Content-Language: en-US Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi All, I am seeing below issue on an ARM platform with CONFIG_PCIEPORTBUS enabled in kernel ISSUE: Any memory access by devices fails FINDINGS: 1. No bridge windows like below are setup and probably this is not allowing any memory access by devices [ 1.280324] pci 0000:00:00.0: bridge window [mem 0xXXX00000-0xXXXfffff] [ 1.280350] pci 0000:00:00.0: bridge window [mem 0xXXX00000-0xXXXfffff pref] 2. On debugging, I see pci_enable_bridge(setup-bus.c) is not called because pci_is_enabled returns true. This is because pci_enable_device is already called for this bridge by portbus driver in pcie_port_device_register(portdrv_core.c). 3. Below patch is resolving this issue without any visible side effects. In fact, I verified AER(which needs PORTBUS) also with this. 3. This patch works without PORTBUS enabled also. QUESTIONS: 1. Does anybody see any problem with this patch? Any reason for pci_is_enabled check above? With best, Jay ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 64a7de2..9b67fff 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -1200,8 +1200,7 @@ void __ref __pci_bus_assign_resources(const struct pci_bus *bus, switch (dev->class >> 8) { case PCI_CLASS_BRIDGE_PCI: - if (!pci_is_enabled(dev)) - pci_setup_bridge(b); + pci_setup_bridge(b); break; case PCI_CLASS_BRIDGE_CARDBUS: