Altera TSE: Set the Pause Quanta value to the IEEE default value
authorVince Bridgers <vbridger@altera.com>
Thu, 24 Apr 2014 21:58:09 +0000 (16:58 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Apr 2014 16:26:26 +0000 (12:26 -0400)
This patch initializes the pause quanta set for transmitted pause frames
to the IEEE specified default of 0xffff.

Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/altera/altera_tse.h
drivers/net/ethernet/altera/altera_tse_main.c

index 6059a09bb8ae331e4c0e8b16d238bda9c30e71d2..465c4aabebbd49d299cb266544c3469acd0f3b6b 100644 (file)
@@ -58,6 +58,8 @@
 /* MAC function configuration default settings */
 #define ALTERA_TSE_TX_IPG_LENGTH       12
 
+#define ALTERA_TSE_PAUSE_QUANTA                0xffff
+
 #define GET_BIT_VALUE(v, bit)          (((v) >> (bit)) & 0x1)
 
 /* MAC Command_Config Register Bit Definitions
index dabba5ed67bd9d597dc232f180b84a91591a2d7d..63712830b3335249b56af82a012e6f7826f91317 100644 (file)
@@ -891,6 +891,8 @@ static int init_mac(struct altera_tse_private *priv)
 
        iowrite32(cmd, &mac->command_config);
 
+       iowrite32(ALTERA_TSE_PAUSE_QUANTA, &mac->pause_quanta);
+
        if (netif_msg_hw(priv))
                dev_dbg(priv->device,
                        "MAC post-initialization: CMD_CONFIG = 0x%08x\n", cmd);