Author: np Date: Wed Nov 19 20:16:56 2014 New Revision: 274724 URL: https://svnweb.freebsd.org/changeset/base/274724
Log: cxgbe(4): figure out the max payload size and save it for later. MFC after: 1 week Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Wed Nov 19 19:46:58 2014 (r274723) +++ head/sys/dev/cxgbe/common/common.h Wed Nov 19 20:16:56 2014 (r274724) @@ -238,6 +238,7 @@ struct vpd_params { struct pci_params { unsigned int vpd_cap_addr; + unsigned int mps; unsigned short speed; unsigned short width; }; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Nov 19 19:46:58 2014 (r274723) +++ head/sys/dev/cxgbe/t4_main.c Wed Nov 19 20:16:56 2014 (r274724) @@ -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; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"