From patchwork Thu Jun 19 06:36:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vidya Sagar X-Patchwork-Id: 4380761 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 5429ABEEAA for ; Thu, 19 Jun 2014 06:39:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8392C20377 for ; Thu, 19 Jun 2014 06:39:46 +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 9779A20125 for ; Thu, 19 Jun 2014 06:39:45 +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 1WxVxa-0001bB-M4; Thu, 19 Jun 2014 06:36:34 +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 1WxVxX-0001ZH-UW for linux-arm-kernel@lists.infradead.org; Thu, 19 Jun 2014 06:36:32 +0000 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Wed, 18 Jun 2014 23:35:53 -0700 Received: from hqemhub02.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Wed, 18 Jun 2014 23:26:47 -0700 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Wed, 18 Jun 2014 23:26:47 -0700 Received: from vidyas-desktop.nvidia.com (172.20.144.16) by hqemhub02.nvidia.com (172.20.150.31) with Microsoft SMTP Server (TLS) id 8.3.342.0; Wed, 18 Jun 2014 23:36:10 -0700 From: Vidya Sagar To: , , , , , , , , Subject: [PATCH v4] ARM: fix debug prints relevant to PCI devices Date: Thu, 19 Jun 2014 12:06:00 +0530 Message-ID: <1403159760-32627-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-20140618_233631_993379_A156688E X-CRM114-Status: GOOD ( 12.44 ) X-Spam-Score: -0.0 (/) 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.18-1 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=-1.9 required=5.0 tests=BAYES_00, T_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 --- v4: * initialized 'has_pcie_dev' to 'false' v3: * removed KERN_INFO from pr_info() which was not removed by mistake in previous patch 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..03c56ba 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 = false; /* * 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 any PCIe devices) */ - 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("PCI: bus%d: Fast back to back transfers %sabled\n", + bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); } EXPORT_SYMBOL(pcibios_fixup_bus);