Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156889
b: refs/heads/master
c: 75c4885
h: refs/heads/master
i:
  156887: 2d48a79
v: v3
  • Loading branch information
Yong Zhang authored and David S. Miller committed Aug 10, 2009
1 parent 8c3f91a commit e42a648
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 148675a7b2061b5a5eb194530b7c4d8de1f2887e
refs/heads/master: 75c4885924f01aed1f887886a49dfa89960de240
12 changes: 10 additions & 2 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ int startup_gfar(struct net_device *dev)
struct gfar __iomem *regs = priv->regs;
int err = 0;
u32 rctrl = 0;
u32 tctrl = 0;
u32 attrs = 0;

gfar_write(&regs->imask, IMASK_INIT_CLEAR);
Expand Down Expand Up @@ -1111,11 +1112,19 @@ int startup_gfar(struct net_device *dev)
rctrl |= RCTRL_PADDING(priv->padding);
}

/* keep vlan related bits if it's enabled */
if (priv->vlgrp) {
rctrl |= RCTRL_VLEX | RCTRL_PRSDEP_INIT;
tctrl |= TCTRL_VLINS;
}

/* Init rctrl based on our settings */
gfar_write(&priv->regs->rctrl, rctrl);

if (dev->features & NETIF_F_IP_CSUM)
gfar_write(&priv->regs->tctrl, TCTRL_INIT_CSUM);
tctrl |= TCTRL_INIT_CSUM;

gfar_write(&priv->regs->tctrl, tctrl);

/* Set the extraction length and index */
attrs = ATTRELI_EL(priv->rx_stash_size) |
Expand Down Expand Up @@ -1450,7 +1459,6 @@ static void gfar_vlan_rx_register(struct net_device *dev,

/* Enable VLAN tag extraction */
tempval = gfar_read(&priv->regs->rctrl);
tempval |= RCTRL_VLEX;
tempval |= (RCTRL_VLEX | RCTRL_PRSDEP_INIT);
gfar_write(&priv->regs->rctrl, tempval);
} else {
Expand Down

0 comments on commit e42a648

Please sign in to comment.