lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <531E0210.1090009@i2se.com>
Date:	Mon, 10 Mar 2014 19:18:56 +0100
From:	Stefan Wahren <stefan.wahren@...e.com>
To:	"fugang.duan@...escale.com" <fugang.duan@...escale.com>,
	Frank Li <lznuaa@...il.com>, Fabio Estevam <festevam@...il.com>
CC:	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-arm-kernel@...ts.arm.linux.org.uk" 
	<linux-arm-kernel@...ts.arm.linux.org.uk>,
	Shawn Guo <shawn.guo@...aro.org>,
	"Fabio.Estevam@...escale.com" <Fabio.Estevam@...escale.com>,
	"Frank.Li@...escale.com" <Frank.Li@...escale.com>,
	Sascha Hauer <kernel@...gutronix.de>
Subject: [PATCH net] eth: fec: Fix lost promiscuous mode after reconnecting
 cable

If the Freescale i.MX28 fec is in promiscuous mode and network cable is
reconnected then the promiscuous mode get lost. The problem is caused
by a too soon call of set_multicast_list to re-enable promisc mode.
The FEC_R_CNTRL register changes are overwritten by fec_restart.

This patch fixes this by moving the call behind the init of FEC_R_CNTRL
register in fec_restart.

Successful tested on a i.MX28 board.

Signed-off-by: Stefan Wahren <stefan.wahren@...e.com>
---
 drivers/net/ethernet/freescale/fec_main.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c
b/drivers/net/ethernet/freescale/fec_main.c
index 479a7cb..03a3513 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -528,13 +528,6 @@ fec_restart(struct net_device *ndev, int duplex)
     /* Clear any outstanding interrupt. */
     writel(0xffc00000, fep->hwp + FEC_IEVENT);
 
-    /* Setup multicast filter. */
-    set_multicast_list(ndev);
-#ifndef CONFIG_M5272
-    writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
-    writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
-#endif
-
     /* Set maximum receive buffer size. */
     writel(PKT_MAXBLR_SIZE, fep->hwp + FEC_R_BUFF_SIZE);
 
@@ -655,6 +648,13 @@ fec_restart(struct net_device *ndev, int duplex)
 
     writel(rcntl, fep->hwp + FEC_R_CNTRL);
 
+    /* Setup multicast filter. */
+    set_multicast_list(ndev);
+#ifndef CONFIG_M5272
+    writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
+    writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
+#endif
+
     if (id_entry->driver_data & FEC_QUIRK_ENET_MAC) {
         /* enable ENET endian swap */
         ecntl |= (1 << 8);
-- 
1.7.10.4

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ