diff options
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 056ba4625780..4544da4cf3ce 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -935,6 +935,7 @@ int startup_gfar(struct net_device *dev) | |||
935 | struct gfar __iomem *regs = priv->regs; | 935 | struct gfar __iomem *regs = priv->regs; |
936 | int err = 0; | 936 | int err = 0; |
937 | u32 rctrl = 0; | 937 | u32 rctrl = 0; |
938 | u32 tctrl = 0; | ||
938 | u32 attrs = 0; | 939 | u32 attrs = 0; |
939 | 940 | ||
940 | gfar_write(®s->imask, IMASK_INIT_CLEAR); | 941 | gfar_write(®s->imask, IMASK_INIT_CLEAR); |
@@ -1110,11 +1111,19 @@ int startup_gfar(struct net_device *dev) | |||
1110 | rctrl |= RCTRL_PADDING(priv->padding); | 1111 | rctrl |= RCTRL_PADDING(priv->padding); |
1111 | } | 1112 | } |
1112 | 1113 | ||
1114 | /* keep vlan related bits if it's enabled */ | ||
1115 | if (priv->vlgrp) { | ||
1116 | rctrl |= RCTRL_VLEX | RCTRL_PRSDEP_INIT; | ||
1117 | tctrl |= TCTRL_VLINS; | ||
1118 | } | ||
1119 | |||
1113 | /* Init rctrl based on our settings */ | 1120 | /* Init rctrl based on our settings */ |
1114 | gfar_write(&priv->regs->rctrl, rctrl); | 1121 | gfar_write(&priv->regs->rctrl, rctrl); |
1115 | 1122 | ||
1116 | if (dev->features & NETIF_F_IP_CSUM) | 1123 | if (dev->features & NETIF_F_IP_CSUM) |
1117 | gfar_write(&priv->regs->tctrl, TCTRL_INIT_CSUM); | 1124 | tctrl |= TCTRL_INIT_CSUM; |
1125 | |||
1126 | gfar_write(&priv->regs->tctrl, tctrl); | ||
1118 | 1127 | ||
1119 | /* Set the extraction length and index */ | 1128 | /* Set the extraction length and index */ |
1120 | attrs = ATTRELI_EL(priv->rx_stash_size) | | 1129 | attrs = ATTRELI_EL(priv->rx_stash_size) | |
@@ -1449,7 +1458,6 @@ static void gfar_vlan_rx_register(struct net_device *dev, | |||
1449 | 1458 | ||
1450 | /* Enable VLAN tag extraction */ | 1459 | /* Enable VLAN tag extraction */ |
1451 | tempval = gfar_read(&priv->regs->rctrl); | 1460 | tempval = gfar_read(&priv->regs->rctrl); |
1452 | tempval |= RCTRL_VLEX; | ||
1453 | tempval |= (RCTRL_VLEX | RCTRL_PRSDEP_INIT); | 1461 | tempval |= (RCTRL_VLEX | RCTRL_PRSDEP_INIT); |
1454 | gfar_write(&priv->regs->rctrl, tempval); | 1462 | gfar_write(&priv->regs->rctrl, tempval); |
1455 | } else { | 1463 | } else { |