1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274724
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;