[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1358936316-8195-1-git-send-email-claudiu.manoil@freescale.com>
Date: Wed, 23 Jan 2013 12:18:36 +0200
From: Claudiu Manoil <claudiu.manoil@...escale.com>
To: <netdev@...r.kernel.org>
CC: Claudiu Manoil <claudiu.manoil@...escale.com>,
Voncken C Acksys <cedric.voncken@...sys.fr>
Subject: [PATCH][net-next] 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@...sys.fr>
Signed-off-by: Claudiu Manoil <claudiu.manoil@...escale.com>
---
drivers/net/ethernet/freescale/gianfar.c | 4 ++++
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(®s->rir0, DEFAULT_RIR0);
}
+ /* Restore PROMISC mode */
+ if (ndev->flags & IFF_PROMISC)
+ rctrl |= RCTRL_PROM;
+
if (ndev->features & NETIF_F_RXCSUM)
rctrl |= RCTRL_CHECKSUMMING;
--
1.6.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists