linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] PCI: Change default MPS behavior
@ 2016-12-07  0:20 Jon Mason
  2016-12-07 19:15 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Mason @ 2016-12-07  0:20 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel

Not all systems have a BIOS or firmware to preconfigure the PCIE MPS
prior to Linux booting.  Without any firmware to pre-setup the MPS, the
PCIE_BUS_DEFAULT will simply set everything to 0 (128b).  This behavior
causes these systems to have non-optimal MPS values.  To get around this
issue, change the default value of pcie_bus_config to be PCIE_BUS_SAFE.
This configures all systems to use better values for the MPS, at the
expense of any potential HW errata that might not like being changed.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
---
 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index ba34907..94d574e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -88,7 +88,7 @@ unsigned long pci_hotplug_mem_size = DEFAULT_HOTPLUG_MEM_SIZE;
 #define DEFAULT_HOTPLUG_BUS_SIZE	1
 unsigned long pci_hotplug_bus_size = DEFAULT_HOTPLUG_BUS_SIZE;
 
-enum pcie_bus_config_types pcie_bus_config = PCIE_BUS_DEFAULT;
+enum pcie_bus_config_types pcie_bus_config = PCIE_BUS_SAFE;
 
 /*
  * The default CLS is used if arch didn't set CLS explicitly and not
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC] PCI: Change default MPS behavior
  2016-12-07  0:20 [RFC] PCI: Change default MPS behavior Jon Mason
@ 2016-12-07 19:15 ` Keith Busch
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2016-12-07 19:15 UTC (permalink / raw)
  To: Jon Mason; +Cc: Bjorn Helgaas, linux-pci, linux-kernel

On Tue, Dec 06, 2016 at 07:20:27PM -0500, Jon Mason wrote:
> Not all systems have a BIOS or firmware to preconfigure the PCIE MPS
> prior to Linux booting.  Without any firmware to pre-setup the MPS, the
> PCIE_BUS_DEFAULT will simply set everything to 0 (128b).  This behavior
> causes these systems to have non-optimal MPS values.  To get around this
> issue, change the default value of pcie_bus_config to be PCIE_BUS_SAFE.
> This configures all systems to use better values for the MPS, at the
> expense of any potential HW errata that might not like being changed.

Wouldn't it be better to provide the kernel parameter to override the
default on such platforms? The PCIE_BUS_SAFE sets the MPS to the lowest
common denominator below the root port, which may be less optimal than
the default behavior for hot plug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-07 19:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07  0:20 [RFC] PCI: Change default MPS behavior Jon Mason
2016-12-07 19:15 ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).