Module Name:    src
Committed By:   skrll
Date:           Fri Jul 15 06:35:27 UTC 2016

Modified Files:
        src/sys/dev/ic [nick-nhusb]: dwc_gmac.c

Log Message:
Define/assert IFEF_START_MPSAFE


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.8 -r1.28.2.9 src/sys/dev/ic/dwc_gmac.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/dwc_gmac.c
diff -u src/sys/dev/ic/dwc_gmac.c:1.28.2.8 src/sys/dev/ic/dwc_gmac.c:1.28.2.9
--- src/sys/dev/ic/dwc_gmac.c:1.28.2.8	Sat Jul  9 20:25:02 2016
+++ src/sys/dev/ic/dwc_gmac.c	Fri Jul 15 06:35:27 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.28.2.8 2016/07/09 20:25:02 skrll Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.28.2.9 2016/07/15 06:35:27 skrll Exp $ */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.28.2.8 2016/07/09 20:25:02 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.28.2.9 2016/07/15 06:35:27 skrll Exp $");
 
 /* #define	DWC_GMAC_DEBUG	1 */
 
@@ -222,6 +222,7 @@ dwc_gmac_attach(struct dwc_gmac_softc *s
 	ifp->if_softc = sc;
 	strlcpy(ifp->if_xname, device_xname(sc->sc_dev), IFNAMSIZ);
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
+	ifp->if_extflags = IFEF_START_MPSAFE;
 	ifp->if_ioctl = dwc_gmac_ioctl;
 	ifp->if_start = dwc_gmac_start;
 	ifp->if_init = dwc_gmac_init;
@@ -824,6 +825,7 @@ static void
 dwc_gmac_start(struct ifnet *ifp)
 {
 	struct dwc_gmac_softc *sc = ifp->if_softc;
+	KASSERT(ifp->if_extflags & IFEF_START_MPSAFE);
 
 	mutex_enter(sc->sc_lock);
 	if (!sc->sc_stopping) {

Reply via email to