pci: add tunable hw.pci.enable_mps_tune
If the tunable is set to 0, the tuning of the MPS (maximum payload size) is disabled and the default MPS values set by the BIOS are used. In this case the system may use a lower speed or operate in a less optimized state, but it can resolve issues with stability and compatibility. With specific devices the tuning of the mps, can lead to a complete freeze of the system. Reviewed by: manu MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D38397
This commit is contained in:
parent
f4ceaff56d
commit
48d70503bc
@ -420,6 +420,11 @@ SYSCTL_INT(_hw_pci, OID_AUTO, clear_aer_on_attach, CTLFLAG_RWTUN,
|
||||
&pci_clear_aer_on_attach, 0,
|
||||
"Clear port and device AER state on driver attach");
|
||||
|
||||
static bool pci_enable_mps_tune = true;
|
||||
SYSCTL_BOOL(_hw_pci, OID_AUTO, enable_mps_tune, CTLFLAG_RWTUN,
|
||||
&pci_enable_mps_tune, 1,
|
||||
"Enable tuning of MPS(maximum payload size)." );
|
||||
|
||||
static int
|
||||
pci_has_quirk(uint32_t devid, int quirk)
|
||||
{
|
||||
@ -4452,6 +4457,7 @@ pci_add_child(device_t bus, struct pci_devinfo *dinfo)
|
||||
pci_cfg_restore(dev, dinfo);
|
||||
pci_print_verbose(dinfo);
|
||||
pci_add_resources(bus, dev, 0, 0);
|
||||
if (pci_enable_mps_tune)
|
||||
pcie_setup_mps(dev);
|
||||
pci_child_added(dinfo->cfg.dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user