aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
authorSandeep Gopalpet <sandeep.kumar@freescale.com>2009-12-15 20:14:58 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-18 23:38:36 -0500
commit1ccb8389f26f2d513b06abe45d8e0b8f32458302 (patch)
tree26d883f2fa2bc9692ab68707e6c73758f6723591 /drivers/net/gianfar.c
parente6bf95ffa8d6f8f4b7ee33ea01490d95b0bbeb6e (diff)
gianfar: Fix a filer bug
We need to enable filer whenever we need to use multiple RX queues. Also, need to program RIR0 register with the required distribution we require, if using RX filer hashing support for packet distribution to multiple queues. Signed-off-by: Sandeep Gopalpet <Sandeep.Kumar@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 6850dc0a7b91..1616531a71f7 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -357,8 +357,11 @@ static void gfar_init_mac(struct net_device *ndev)
357 /* Configure the coalescing support */ 357 /* Configure the coalescing support */
358 gfar_configure_coalescing(priv, 0xFF, 0xFF); 358 gfar_configure_coalescing(priv, 0xFF, 0xFF);
359 359
360 if (priv->rx_filer_enable) 360 if (priv->rx_filer_enable) {
361 rctrl |= RCTRL_FILREN; 361 rctrl |= RCTRL_FILREN;
362 /* Program the RIR0 reg with the required distribution */
363 gfar_write(&regs->rir0, DEFAULT_RIR0);
364 }
362 365
363 if (priv->rx_csum_enable) 366 if (priv->rx_csum_enable)
364 rctrl |= RCTRL_CHECKSUMMING; 367 rctrl |= RCTRL_CHECKSUMMING;
@@ -1022,6 +1025,9 @@ static int gfar_probe(struct of_device *ofdev,
1022 priv->rx_queue[i]->rxic = DEFAULT_RXIC; 1025 priv->rx_queue[i]->rxic = DEFAULT_RXIC;
1023 } 1026 }
1024 1027
1028 /* enable filer if using multiple RX queues*/
1029 if(priv->num_rx_queues > 1)
1030 priv->rx_filer_enable = 1;
1025 /* Enable most messages by default */ 1031 /* Enable most messages by default */
1026 priv->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1; 1032 priv->msg_enable = (NETIF_MSG_IFUP << 1 ) - 1;
1027 1033