Thread (10 messages) flat view 10 messages, 2 authors, 2007-12-01
STALE6862d

[PATCH 5/6] skge: increase TX threshold for Jumbo

From: Stephen Hemminger <hidden>
Date: 2007-11-26 20:04:13

Need to increase TX threshold when doing Jumbo frames on dual port board
to avoid underruns. (Code from sk98lin).

Signed-off-by: Stephen Hemminger <redacted>

--- a/drivers/net/skge.c	2007-11-21 14:05:59.000000000 -0800
+++ b/drivers/net/skge.c	2007-11-21 14:06:15.000000000 -0800
@@ -1633,15 +1633,14 @@ static void genesis_mac_init(struct skge
 	}
 	xm_write16(hw, port, XM_RX_CMD, r);
 
-
 	/* We want short frames padded to 60 bytes. */
 	xm_write16(hw, port, XM_TX_CMD, XM_TX_AUTO_PAD);
 
-	/*
-	 * Bump up the transmit threshold. This helps hold off transmit
-	 * underruns when we're blasting traffic from both ports at once.
-	 */
-	xm_write16(hw, port, XM_TX_THR, 512);
+	/* Increase threshold for jumbo frames on dual port */
+	if (hw->ports > 1 && jumbo)
+		xm_write16(hw, port, XM_TX_THR, 1020);
+	else
+		xm_write16(hw, port, XM_TX_THR, 512);
 
 	/*
 	 * Enable the reception of all error frames. This is is
-- 
Stephen Hemminger <shemminger@linux-foundation.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help