netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch]  Gianfar : Enable promiscous mode after queue time out
@ 2013-01-21 16:24 Cedric VONCKEN
  2013-01-23  9:58 ` Claudiu Manoil
  0 siblings, 1 reply; 2+ messages in thread
From: Cedric VONCKEN @ 2013-01-21 16:24 UTC (permalink / raw)
  To: Claudiu Manoil, netdev

	Hi all, 

	When the Netdev tx queue timeout occurred, the function
gfar_timeout(..) is called. This function calls indirectly the
gfar_init_mac(..) function.

 	In this function, the rctrl register is set to a default value.

 	If the Promiscuous is enable on the net dev ( flag IFF_PROMISC
is  set), the gfar_init_function does not reactivate it.

 	The Promiscuous mode is used for example when the netdev is
bridged.
 	
 	I apply this patch on the kernel 3.8-rc4 to fix it.

	Signed-off-by : Voncken C Acksys <cedric.voncken@acksys.fr>

--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -349,6 +349,11 @@ static void gfar_init_mac(struct net_dev
 	/* Configure the coalescing support */
 	gfar_configure_coalescing(priv, 0xFF, 0xFF);
 
+	if (ndev->flags & IFF_PROMISC) {
+		/* Set RCTRL to PROM */
+		rctrl |= RCTRL_PROM;
+	}
+
 	if (priv->rx_filer_enable) {
 		rctrl |= RCTRL_FILREN;
 		/* Program the RIR0 reg with the required distribution
*/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-23 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21 16:24 [patch] Gianfar : Enable promiscous mode after queue time out Cedric VONCKEN
2013-01-23  9:58 ` Claudiu Manoil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).