Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/cavium/dev Delay setting of the filters at att...



details:   https://anonhg.NetBSD.org/src/rev/be6e640d8412
branches:  trunk
changeset: 451834:be6e640d8412
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jun 07 07:41:22 2019 +0000

description:
Delay setting of the filters at attach time a bit to avoid using an
unitialized mutex. From msaitoh@.

diffstat:

 sys/arch/mips/cavium/dev/if_cnmac.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 73f0472a4fb9 -r be6e640d8412 sys/arch/mips/cavium/dev/if_cnmac.c
--- a/sys/arch/mips/cavium/dev/if_cnmac.c       Fri Jun 07 06:00:05 2019 +0000
+++ b/sys/arch/mips/cavium/dev/if_cnmac.c       Fri Jun 07 07:41:22 2019 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: if_cnmac.c,v 1.13 2019/05/29 07:46:08 msaitoh Exp $    */
+/*     $NetBSD: if_cnmac.c,v 1.14 2019/06/07 07:41:22 martin Exp $     */
 
 #include <sys/cdefs.h>
 #if 0
-__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.13 2019/05/29 07:46:08 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.14 2019/06/07 07:41:22 martin Exp $");
 #endif
 
 #include "opt_octeon.h"
@@ -372,10 +372,10 @@
        sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
 
        octeon_gmx_set_mac_addr(sc->sc_gmx_port, enaddr);
-       octeon_gmx_set_filter(sc->sc_gmx_port);
 
        if_attach(ifp);
        ether_ifattach(ifp, enaddr);
+       octeon_gmx_set_filter(sc->sc_gmx_port);
 
        /* XXX */
        sc->sc_rate_recv_check_link_cap.tv_sec = 1;



Home | Main Index | Thread Index | Old Index