diff options
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index f8ffcbf0bc39..24f7ca5e17de 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -491,6 +491,7 @@ static int gfar_remove(struct of_device *ofdev) | |||
491 | 491 | ||
492 | dev_set_drvdata(&ofdev->dev, NULL); | 492 | dev_set_drvdata(&ofdev->dev, NULL); |
493 | 493 | ||
494 | unregister_netdev(dev); | ||
494 | iounmap(priv->regs); | 495 | iounmap(priv->regs); |
495 | free_netdev(priv->ndev); | 496 | free_netdev(priv->ndev); |
496 | 497 | ||
@@ -936,6 +937,7 @@ int startup_gfar(struct net_device *dev) | |||
936 | struct gfar __iomem *regs = priv->regs; | 937 | struct gfar __iomem *regs = priv->regs; |
937 | int err = 0; | 938 | int err = 0; |
938 | u32 rctrl = 0; | 939 | u32 rctrl = 0; |
940 | u32 tctrl = 0; | ||
939 | u32 attrs = 0; | 941 | u32 attrs = 0; |
940 | 942 | ||
941 | gfar_write(®s->imask, IMASK_INIT_CLEAR); | 943 | gfar_write(®s->imask, IMASK_INIT_CLEAR); |
@@ -1111,11 +1113,19 @@ int startup_gfar(struct net_device *dev) | |||
1111 | rctrl |= RCTRL_PADDING(priv->padding); | 1113 | rctrl |= RCTRL_PADDING(priv->padding); |
1112 | } | 1114 | } |
1113 | 1115 | ||
1116 | /* keep vlan related bits if it's enabled */ | ||
1117 | if (priv->vlgrp) { | ||
1118 | rctrl |= RCTRL_VLEX | RCTRL_PRSDEP_INIT; | ||
1119 | tctrl |= TCTRL_VLINS; | ||
1120 | } | ||
1121 | |||
1114 | /* Init rctrl based on our settings */ | 1122 | /* Init rctrl based on our settings */ |
1115 | gfar_write(&priv->regs->rctrl, rctrl); | 1123 | gfar_write(&priv->regs->rctrl, rctrl); |
1116 | 1124 | ||
1117 | if (dev->features & NETIF_F_IP_CSUM) | 1125 | if (dev->features & NETIF_F_IP_CSUM) |
1118 | gfar_write(&priv->regs->tctrl, TCTRL_INIT_CSUM); | 1126 | tctrl |= TCTRL_INIT_CSUM; |
1127 | |||
1128 | gfar_write(&priv->regs->tctrl, tctrl); | ||
1119 | 1129 | ||
1120 | /* Set the extraction length and index */ | 1130 | /* Set the extraction length and index */ |
1121 | attrs = ATTRELI_EL(priv->rx_stash_size) | | 1131 | attrs = ATTRELI_EL(priv->rx_stash_size) | |
@@ -1450,7 +1460,6 @@ static void gfar_vlan_rx_register(struct net_device *dev, | |||
1450 | 1460 | ||
1451 | /* Enable VLAN tag extraction */ | 1461 | /* Enable VLAN tag extraction */ |
1452 | tempval = gfar_read(&priv->regs->rctrl); | 1462 | tempval = gfar_read(&priv->regs->rctrl); |
1453 | tempval |= RCTRL_VLEX; | ||
1454 | tempval |= (RCTRL_VLEX | RCTRL_PRSDEP_INIT); | 1463 | tempval |= (RCTRL_VLEX | RCTRL_PRSDEP_INIT); |
1455 | gfar_write(&priv->regs->rctrl, tempval); | 1464 | gfar_write(&priv->regs->rctrl, tempval); |
1456 | } else { | 1465 | } else { |