diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-21 22:38:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 22:38:42 +0200 |
commit | 033b1142f4bd44a116d1356fe4a0510437ceddf9 (patch) | |
tree | d2a971a7dc9f3a1af8035e38419c4c4ad8c22632 /drivers/net/gianfar.c | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/... (diff) | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sag... (diff) | |
download | linux-033b1142f4bd44a116d1356fe4a0510437ceddf9.tar.xz linux-033b1142f4bd44a116d1356fe4a0510437ceddf9.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/bluetooth/l2cap_core.c
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 3321d714ca22..d265c6e13873 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -2287,6 +2287,23 @@ static int gfar_set_mac_address(struct net_device *dev) return 0; } +/* Check if rx parser should be activated */ +void gfar_check_rx_parser_mode(struct gfar_private *priv) +{ + struct gfar __iomem *regs; + u32 tempval; + + regs = priv->gfargrp[0].regs; + + tempval = gfar_read(®s->rctrl); + /* If parse is no longer required, then disable parser */ + if (tempval & RCTRL_REQ_PARSER) + tempval |= RCTRL_PRSDEP_INIT; + else + tempval &= ~RCTRL_PRSDEP_INIT; + gfar_write(®s->rctrl, tempval); +} + /* Enables and disables VLAN insertion/extraction */ static void gfar_vlan_rx_register(struct net_device *dev, @@ -2323,12 +2340,9 @@ static void gfar_vlan_rx_register(struct net_device *dev, /* Disable VLAN tag extraction */ tempval = gfar_read(®s->rctrl); tempval &= ~RCTRL_VLEX; - /* If parse is no longer required, then disable parser */ - if (tempval & RCTRL_REQ_PARSER) - tempval |= RCTRL_PRSDEP_INIT; - else - tempval &= ~RCTRL_PRSDEP_INIT; gfar_write(®s->rctrl, tempval); + + gfar_check_rx_parser_mode(priv); } gfar_change_mtu(dev, dev->mtu); |