]> git.samba.org - sfrench/cifs-2.6.git/commitdiff
net: fs_enet: set back promiscuity mode after restart
authorLEROY Christophe <christophe.leroy@c-s.fr>
Wed, 22 Oct 2014 07:05:47 +0000 (09:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Oct 2014 19:33:13 +0000 (15:33 -0400)
After interface restart (eg: after link disconnection/reconnection), the bridge
function doesn't work anymore. This is due to the promiscuous mode being cleared
by the restart.

The mac-fcc already includes code to set the promiscuous mode back during the restart.
This patch adds the same handling to mac-fec and mac-scc.

Tested with bridge function on MPC885 with FEC.

Reported-by: Germain Montoies <germain.montoies@c-s.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fs_enet/mac-fec.c
drivers/net/ethernet/freescale/fs_enet/mac-scc.c

index 3d4e08be170970b7f981c19a23e65c35f7ae860b..b34214e2df5f6e55bdbb29e6a8016c139e74345c 100644 (file)
@@ -341,6 +341,9 @@ static void restart(struct net_device *dev)
                FC(fecp, x_cntrl, FEC_TCNTRL_FDEN);     /* FD disable */
        }
 
+       /* Restore multicast and promiscuous settings */
+       set_multicast_list(dev);
+
        /*
         * Enable interrupts we wish to service.
         */
index f30411f0701f694175392198941b0d69d3798682..7a184e8816a48f9eb74f4890b60b32345dbcf5f1 100644 (file)
@@ -355,6 +355,9 @@ static void restart(struct net_device *dev)
        if (fep->phydev->duplex)
                S16(sccp, scc_psmr, SCC_PSMR_LPB | SCC_PSMR_FDE);
 
+       /* Restore multicast and promiscuous settings */
+       set_multicast_list(dev);
+
        S32(sccp, scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT);
 }