]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
skge: increase TX threshold for Jumbo
authorStephen Hemminger <shemminger@linux-foundation.org>
Mon, 26 Nov 2007 19:54:52 +0000 (11:54 -0800)
committerJeff Garzik <jeff@garzik.org>
Sat, 1 Dec 2007 21:32:29 +0000 (16:32 -0500)
Need to increase TX threshold when doing Jumbo frames on dual port board
to avoid underruns. (Code from sk98lin).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/skge.c

index 73a424694ac52db326fa4fb5241941dddfd0fcd3..f7e0fbbd4ad6840b3157c07a2b9fe8ca6f3df343 100644 (file)
@@ -1633,15 +1633,14 @@ static void genesis_mac_init(struct skge_hw *hw, int port)
        }
        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