aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorJon Mason <mason@myri.com>2011-10-14 15:56:16 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2011-10-27 15:45:44 -0400
commita513a99a7cebfb452839cc09c9c0586f72d96414 (patch)
tree566fb8a8fa8c02ede05b2694dd16a8efea5342bb /drivers/pci/probe.c
parenta1c473aa11e61bc871be16279c9bf976acf22504 (diff)
PCI: Clean-up MPS debug output
Clean-up MPS debug output to make it a single line and aligned, thus making it more readable for a large number of buses and devices in a single system. Suggested by Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jon Mason <mason@myri.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 482942439852..04e74f485714 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1428,24 +1428,25 @@ static void pcie_write_mrrs(struct pci_dev *dev)
1428 1428
1429static int pcie_bus_configure_set(struct pci_dev *dev, void *data) 1429static int pcie_bus_configure_set(struct pci_dev *dev, void *data)
1430{ 1430{
1431 int mps = 128 << *(u8 *)data; 1431 int mps, orig_mps;
1432 1432
1433 if (!pci_is_pcie(dev)) 1433 if (!pci_is_pcie(dev))
1434 return 0; 1434 return 0;
1435 1435
1436 dev_dbg(&dev->dev, "Dev MPS %d MPSS %d MRRS %d\n", 1436 mps = 128 << *(u8 *)data;
1437 pcie_get_mps(dev), 128<<dev->pcie_mpss, pcie_get_readrq(dev)); 1437 orig_mps = pcie_get_mps(dev);
1438 1438
1439 pcie_write_mps(dev, mps); 1439 pcie_write_mps(dev, mps);
1440 pcie_write_mrrs(dev); 1440 pcie_write_mrrs(dev);
1441 1441
1442 dev_dbg(&dev->dev, "Dev MPS %d MPSS %d MRRS %d\n", 1442 dev_info(&dev->dev, "PCI-E Max Payload Size set to %4d/%4d (was %4d), "
1443 pcie_get_mps(dev), 128<<dev->pcie_mpss, pcie_get_readrq(dev)); 1443 "Max Read Rq %4d\n", pcie_get_mps(dev), 128 << dev->pcie_mpss,
1444 orig_mps, pcie_get_readrq(dev));
1444 1445
1445 return 0; 1446 return 0;
1446} 1447}
1447 1448
1448/* pcie_bus_configure_mps requires that pci_walk_bus work in a top-down, 1449/* pcie_bus_configure_settings requires that pci_walk_bus work in a top-down,
1449 * parents then children fashion. If this changes, then this code will not 1450 * parents then children fashion. If this changes, then this code will not
1450 * work as designed. 1451 * work as designed.
1451 */ 1452 */