cxgbe(4): figure out the max payload size and save it for later.

MFC after:	1 week
This commit is contained in:
Navdeep Parhar 2014-11-19 20:16:56 +00:00
parent e202e3ffec
commit 729fee332b
2 changed files with 3 additions and 0 deletions

View File

@ -238,6 +238,7 @@ struct vpd_params {
struct pci_params {
unsigned int vpd_cap_addr;
unsigned int mps;
unsigned short speed;
unsigned short width;
};

View File

@ -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;