summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorClaudiu Manoil <claudiu.manoil@freescale.com>2013-01-23 00:18:36 (GMT)
committerDavid S. Miller <davem@davemloft.net>2013-01-23 18:54:11 (GMT)
commitf5ae62799a31fb2ce8b272bf184688e2a4770d19 (patch)
treef54d96c0be20cad3ea8de40f6a7b5164c7c32c8d /drivers
parentc617f398edd4db2b8567a28e899a88f8f574798d (diff)
downloadlinux-f5ae62799a31fb2ce8b272bf184688e2a4770d19.tar.xz
gianfar: Restore promisc mode on gfar_init_mac()
Reactivate promiscuous mode in H/W upon gfar_init_mac(), if the net dev requires it (IFF_PROMISC flag set). This way the promisc mode is preserved accross device reset conditions like tx timeout, device restore, a.s.o. Signed-off-by: Voncken C Acksys <cedric.voncken@acksys.fr> Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index bffb2ed..e765b9b 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -355,6 +355,10 @@ static void gfar_init_mac(struct net_device *ndev)
gfar_write(&regs->rir0, DEFAULT_RIR0);
}
+ /* Restore PROMISC mode */
+ if (ndev->flags & IFF_PROMISC)
+ rctrl |= RCTRL_PROM;
+
if (ndev->features & NETIF_F_RXCSUM)
rctrl |= RCTRL_CHECKSUMMING;