]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
ARM: fix debug prints relevant to PCI devices
authorVidya Sagar <vidyas@nvidia.com>
Tue, 3 Jun 2014 05:54:23 +0000 (11:24 +0530)
committerVidya Sagar <vidyas@nvidia.com>
Fri, 13 Jun 2014 11:38:12 +0000 (04:38 -0700)
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

Bug 1235581

Change-Id: Ife0c909e92a701fa99870e70e70bbd3e67a4c9a4
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/422110
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
arch/arm/kernel/bios32.c
arch/arm64/kernel/bios32.c

index b2ed73c454892ba8c7a7c06d66ef93881b6c2126..ecb6716a2a05590192f6c6a1c8f35ee6f4f73ba9 100644 (file)
@@ -293,6 +293,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
@@ -301,6 +302,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);
 
                /*
@@ -357,9 +360,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("PCI: bus%d: Fast back to back transfers %sabled\n",
+                       bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis");
 }
 EXPORT_SYMBOL(pcibios_fixup_bus);
 
index 6dcb15ea212b6ffd3b3b9c2dac807d877658f5e6..0a078dd3bd8f639c487fe519ddf416a0e89760b2 100644 (file)
@@ -295,6 +295,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
@@ -303,6 +304,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);
 
                /*
@@ -359,9 +362,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("PCI: bus%d: Fast back to back transfers %sabled\n",
+                       bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis");
 }
 EXPORT_SYMBOL(pcibios_fixup_bus);