summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2006-11-23 05:43:39 +0000
committerkmacy <kmacy@FreeBSD.org>2006-11-23 05:43:39 +0000
commit9dfce31659b8aa731b53727f7cdde96741afe51e (patch)
tree5cc802b46a36f49fc39f8feff4898b541f2e9857
parent16e09012c1e4f12bd31340d80dbfb7b38c176327 (diff)
downloadFreeBSD-src-9dfce31659b8aa731b53727f7cdde96741afe51e.zip
FreeBSD-src-9dfce31659b8aa731b53727f7cdde96741afe51e.tar.gz
Move magic PCIe workaround constant to header - add appropriate comment
Suggested by: jfvogel
-rw-r--r--sys/dev/em/if_em.c2
-rw-r--r--sys/dev/em/if_em.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 0033c50..a477cf0 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -2579,7 +2579,7 @@ em_allocate_transmit_structures(struct adapter *adapter)
if ((adapter->hw.mac_type > em_82544) &&
(adapter->hw.mac_type != em_82547)) {
size = EM_TSO_SIZE;
- segsize = 4096; /* page size isn't always 4k */
+ segsize = EM_TSO_PCIE_SEGMENT_SIZE;
}
if ((error = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */
diff --git a/sys/dev/em/if_em.h b/sys/dev/em/if_em.h
index 54b3f1d..42b85a5 100644
--- a/sys/dev/em/if_em.h
+++ b/sys/dev/em/if_em.h
@@ -181,6 +181,12 @@ POSSIBILITY OF SUCH DAMAGE.
*/
/* #define EM_MASTER_SLAVE 2 */
+
+/*
+ * Limitation of some PCIe chipsets when using TSO
+ */
+#define EM_TSO_PCIE_SEGMENT_SIZE 4096
+
/* Tunables -- End */
#define AUTONEG_ADV_DEFAULT (ADVERTISE_10_HALF | ADVERTISE_10_FULL | \
OpenPOWER on IntegriCloud