diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 7a88462a2c5b..820354ab696f 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -238,6 +238,7 @@ struct vpd_params { struct pci_params { unsigned int vpd_cap_addr; + unsigned int mps; unsigned short speed; unsigned short width; }; diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 8089eb4cf053..f9caf2eec1d8 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -594,6 +594,8 @@ t4_attach(device_t dev) v = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2); v |= PCIEM_CTL_RELAXED_ORD_ENABLE; pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2); + + sc->params.pci.mps = 128 << ((v & PCIEM_CTL_MAX_PAYLOAD) >> 5); } sc->traceq = -1;