summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-21 12:37:36 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-11-21 12:37:36 +0000
commitf93b9d7a816f35f591f05fa7b3575772f0d5f34f (patch)
tree2933327927e01de01567f727f11dfd4a4873fd8b /sys/dev/pci
parent2a48e53c56589d48cfbdbca505e50eb9d3feff8a (diff)
Correctly set the default value for the FCRTH
X540 datasheet specifies that Flow Control Receive Threshold High should be set to the Rx Buffer Size minus the delay value which is different for different modes of operation, however the minimum is 0x6000 (24576). Mirrors the bc1fc64fd2d9093496e5b04c6d94d26bfa629c9c commit to the Linux source code, but picked up from the 280182 commit to FreeBSD.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ixgbe.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/ixgbe.c b/sys/dev/pci/ixgbe.c
index 6304f0480bc..b2913205040 100644
--- a/sys/dev/pci/ixgbe.c
+++ b/sys/dev/pci/ixgbe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ixgbe.c,v 1.19 2016/11/17 21:08:27 mikeb Exp $ */
+/* $OpenBSD: ixgbe.c,v 1.20 2016/11/21 12:37:35 mikeb Exp $ */
/******************************************************************************
@@ -2287,10 +2287,11 @@ int32_t ixgbe_fc_enable_generic(struct ixgbe_hw *hw)
/*
* In order to prevent Tx hangs when the internal Tx
* switch is enabled we must set the high water mark
- * to the maximum FCRTH value. This allows the Tx
- * switch to function even under heavy Rx workloads.
+ * to the Rx packet buffer size - 24KB. This allows
+ * the Tx switch to function even under heavy Rx
+ * workloads.
*/
- fcrth = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)) - 32;
+ fcrth = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)) - 0x6000;
}
IXGBE_WRITE_REG(hw, IXGBE_FCRTH_82599(i), fcrth);