From patchwork Sun Sep 7 10:28:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vidya sagar X-Patchwork-Id: 4858441 Return-Path: X-Original-To: patchwork-linux-arm@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 C95E69F32E for ; Sun, 7 Sep 2014 10:33:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F278320138 for ; Sun, 7 Sep 2014 10:33:24 +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 3666E20131 for ; Sun, 7 Sep 2014 10:33:24 +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 1XQZjH-0003oE-S8; Sun, 07 Sep 2014 10:29:55 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XQZjE-0003ls-Mz for linux-arm-kernel@lists.infradead.org; Sun, 07 Sep 2014 10:29:53 +0000 Received: by mail-pa0-f51.google.com with SMTP id kx10so1171836pab.38 for ; Sun, 07 Sep 2014 03:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=E69YU/N5h+hgCmhVQHz76llngs8rYKm6tKcbVf+lInI=; b=Nr06KMEvJBrP+WblGrAdECKxf4hygv9IQ7zoPHINQhU5mK6oyIs3LlTAhYQKC6TLIW PKXEOOSfpLGxwN7djmX0mNsR8RWjZKpq8rGWCVYNsNJfC4XKCo76iDG+Mi6It2fCYOJJ MlwWanbYd0ApfnrDM3o27zLPirQ1iWjeTOf/Hah1XDuZGGxRksBf5JPdrSjX1zeVQCZ4 dTqJDqSPxqTtf3JA4QX7z6rF/bijTaXWHMN/WX6n/f17PVhbsW1qL7RkpF5dxZG14TFM hPYI5teKSPVzprRd3nbi3fJShuxhE4Bic7SxvKiAcmuBujemV3jMzTOFwPnqSGNtTDCK 8Hsw== X-Received: by 10.68.229.193 with SMTP id ss1mr2817004pbc.158.1410085770684; Sun, 07 Sep 2014 03:29:30 -0700 (PDT) Received: from localhost.localdomain ([106.206.132.239]) by mx.google.com with ESMTPSA id fk5sm6117257pbc.53.2014.09.07.03.29.26 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Sep 2014 03:29:29 -0700 (PDT) From: Vidya Sagar X-Google-Original-From: Vidya Sagar To: linux@arm.linux.org.uk, bhelgaas@google.com, wangyijing@huawei.com, thierry.reding@gmail.com, jason@lakedaemon.net, will.deacon@arm.com, swarren@nvidia.com Subject: [PATCH v4] ARM: fix debug prints relevant to PCI devices Date: Sun, 7 Sep 2014 15:58:07 +0530 Message-Id: <1410085687-11273-1-git-send-email-vidyas@nvidia.com> X-Mailer: git-send-email 1.8.1.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140907_032952_767090_9BA68914 X-CRM114-Status: GOOD ( 12.47 ) X-Spam-Score: -0.8 (/) Cc: kthota@nvidia.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vidya Sagar 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Vidya Sagar 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);