svn commit: r275094 - in stable/8/sys/dev/cxgbe: . common

Navdeep Parhar np at FreeBSD.org
Wed Nov 26 00:48:08 UTC 2014


Author: np
Date: Wed Nov 26 00:48:07 2014
New Revision: 275094
URL: https://svnweb.freebsd.org/changeset/base/275094

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

Modified:
  stable/8/sys/dev/cxgbe/common/common.h
  stable/8/sys/dev/cxgbe/t4_main.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/cxgbe/   (props changed)

Modified: stable/8/sys/dev/cxgbe/common/common.h
==============================================================================
--- stable/8/sys/dev/cxgbe/common/common.h	Wed Nov 26 00:47:36 2014	(r275093)
+++ stable/8/sys/dev/cxgbe/common/common.h	Wed Nov 26 00:48:07 2014	(r275094)
@@ -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: stable/8/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/8/sys/dev/cxgbe/t4_main.c	Wed Nov 26 00:47:36 2014	(r275093)
+++ stable/8/sys/dev/cxgbe/t4_main.c	Wed Nov 26 00:48:07 2014	(r275094)
@@ -567,6 +567,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);
 	}
 
 	snprintf(sc->lockname, sizeof(sc->lockname), "%s",


More information about the svn-src-all mailing list