From patchwork Thu Jun 5 18:47:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vidya Sagar X-Patchwork-Id: 4308161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C04F4BEEAA for ; Thu, 5 Jun 2014 18:50:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EDDE4201EC for ; Thu, 5 Jun 2014 18:50:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 26223201CE for ; Thu, 5 Jun 2014 18:50:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WsciS-0003Ug-UG; Thu, 05 Jun 2014 18:48:44 +0000 Received: from hqemgate16.nvidia.com ([216.228.121.65]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WsciR-0003SB-3b for linux-arm-kernel@lists.infradead.org; Thu, 05 Jun 2014 18:48:43 +0000 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Thu, 05 Jun 2014 11:47:50 -0700 Received: from hqemhub01.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Thu, 05 Jun 2014 11:40:19 -0700 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Thu, 05 Jun 2014 11:40:19 -0700 Received: from vidyas-desktop.nvidia.com (172.20.144.16) by hqemhub01.nvidia.com (172.20.150.30) with Microsoft SMTP Server (TLS) id 8.3.342.0; Thu, 5 Jun 2014 11:48:21 -0700 From: Vidya Sagar To: , , , , , , , , Subject: [PATCH v2] ARM: fix debug prints relevant to PCI devices Date: Fri, 6 Jun 2014 00:17:48 +0530 Message-ID: <1401994068-820-1-git-send-email-vidyas@nvidia.com> X-Mailer: git-send-email 1.8.1.5 X-NVConfidentiality: public MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140605_114843_144308_2CF17A35 X-CRM114-Status: GOOD ( 12.26 ) X-Spam-Score: -0.7 (/) Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sagar.tv@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 As per PCIe spec, fast back-to-back transactions feature is not applicable to PCIe devices. Hence, do not print that fast back-to-back trasactions are disabled when there is a PCIe device found on the bus Signed-off-by: Vidya Sagar --- v2: * Modified has_pcie_dev type to bool and used pci_is_pcie() instead of pci_pcie_cap() * replaced printk with pr_info arch/arm/kernel/bios32.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 17a26c1..d48d9d3 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -290,6 +290,7 @@ void pcibios_fixup_bus(struct pci_bus *bus) { struct pci_dev *dev; u16 features = PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_FAST_BACK; + bool has_pcie_dev = 0; /* * Walk the devices on this bus, working out what we can @@ -298,6 +299,8 @@ void pcibios_fixup_bus(struct pci_bus *bus) list_for_each_entry(dev, &bus->devices, bus_list) { u16 status; + if (!has_pcie_dev) + has_pcie_dev = pci_is_pcie(dev); pci_read_config_word(dev, PCI_STATUS, &status); /* @@ -354,9 +357,11 @@ void pcibios_fixup_bus(struct pci_bus *bus) /* * Report what we did for this bus + * (only if the bus doesn't have even one PCIe device) */ - printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", - bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); + if (!has_pcie_dev) + pr_info(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", + bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); } EXPORT_SYMBOL(pcibios_fixup_bus);