aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-07-21 11:59:54 -0400
committerIngo Molnar <mingo@elte.hu>2011-07-21 12:00:01 -0400
commit994bf1c92270e3d7731ea08f1d1bd7a668314e60 (patch)
tree4409a21eab486e53fbe350a66e8a4f28b7a720c0 /drivers/net/gianfar.c
parentbd96efe17d945f0bad56d592f8686dc6309905e7 (diff)
parentcf6ace16a3cd8b728fb0afa68368fd40bbeae19f (diff)
Merge branch 'linus' into sched/core
Merge reason: pick up the latest scheduler fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 2dfcc8047847..dfa55f94ba7f 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -2289,6 +2289,23 @@ static int gfar_set_mac_address(struct net_device *dev)
2289 return 0; 2289 return 0;
2290} 2290}
2291 2291
2292/* Check if rx parser should be activated */
2293void gfar_check_rx_parser_mode(struct gfar_private *priv)
2294{
2295 struct gfar __iomem *regs;
2296 u32 tempval;
2297
2298 regs = priv->gfargrp[0].regs;
2299
2300 tempval = gfar_read(&regs->rctrl);
2301 /* If parse is no longer required, then disable parser */
2302 if (tempval & RCTRL_REQ_PARSER)
2303 tempval |= RCTRL_PRSDEP_INIT;
2304 else
2305 tempval &= ~RCTRL_PRSDEP_INIT;
2306 gfar_write(&regs->rctrl, tempval);
2307}
2308
2292 2309
2293/* Enables and disables VLAN insertion/extraction */ 2310/* Enables and disables VLAN insertion/extraction */
2294static void gfar_vlan_rx_register(struct net_device *dev, 2311static void gfar_vlan_rx_register(struct net_device *dev,
@@ -2325,12 +2342,9 @@ static void gfar_vlan_rx_register(struct net_device *dev,
2325 /* Disable VLAN tag extraction */ 2342 /* Disable VLAN tag extraction */
2326 tempval = gfar_read(&regs->rctrl); 2343 tempval = gfar_read(&regs->rctrl);
2327 tempval &= ~RCTRL_VLEX; 2344 tempval &= ~RCTRL_VLEX;
2328 /* If parse is no longer required, then disable parser */
2329 if (tempval & RCTRL_REQ_PARSER)
2330 tempval |= RCTRL_PRSDEP_INIT;
2331 else
2332 tempval &= ~RCTRL_PRSDEP_INIT;
2333 gfar_write(&regs->rctrl, tempval); 2345 gfar_write(&regs->rctrl, tempval);
2346
2347 gfar_check_rx_parser_mode(priv);
2334 } 2348 }
2335 2349
2336 gfar_change_mtu(dev, dev->mtu); 2350 gfar_change_mtu(dev, dev->mtu);