[Midnightbsd-cvs] src [12298] trunk/sys/dev/usb/net: add attack wait

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Feb 2 16:21:48 EST 2020


Revision: 12298
          http://svnweb.midnightbsd.org/src/?rev=12298
Author:   laffer1
Date:     2020-02-02 16:21:47 -0500 (Sun, 02 Feb 2020)
Log Message:
-----------
add attack wait

Modified Paths:
--------------
    trunk/sys/dev/usb/net/usb_ethernet.c
    trunk/sys/dev/usb/net/usb_ethernet.h

Modified: trunk/sys/dev/usb/net/usb_ethernet.c
===================================================================
--- trunk/sys/dev/usb/net/usb_ethernet.c	2020-02-02 21:21:13 UTC (rev 12297)
+++ trunk/sys/dev/usb/net/usb_ethernet.c	2020-02-02 21:21:47 UTC (rev 12298)
@@ -1,5 +1,5 @@
 /* $MidnightBSD$ */
-/* $FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.c 262436 2014-02-24 08:50:06Z rodrigc $ */
+/* $FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.c 334758 2018-06-07 07:33:46Z hselasky $ */
 /*-
  * Copyright (c) 2009 Andrew Thompson (thompsa at FreeBSD.org)
  *
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.c 262436 2014-02-24 08:50:06Z rodrigc $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.c 334758 2018-06-07 07:33:46Z hselasky $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -188,6 +188,17 @@
 	return (error);
 }
 
+void
+uether_ifattach_wait(struct usb_ether *ue)
+{
+
+	UE_LOCK(ue);
+	usb_proc_mwait(&ue->ue_tq,
+	    &ue->ue_sync_task[0].hdr,
+	    &ue->ue_sync_task[1].hdr);
+	UE_UNLOCK(ue);
+}
+
 static void
 ue_attach_post_task(struct usb_proc_msg *_task)
 {

Modified: trunk/sys/dev/usb/net/usb_ethernet.h
===================================================================
--- trunk/sys/dev/usb/net/usb_ethernet.h	2020-02-02 21:21:13 UTC (rev 12297)
+++ trunk/sys/dev/usb/net/usb_ethernet.h	2020-02-02 21:21:47 UTC (rev 12298)
@@ -1,5 +1,5 @@
 /* $MidnightBSD$ */
-/* $FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.h 226709 2011-10-24 23:38:11Z yongari $ */
+/* $FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.h 334758 2018-06-07 07:33:46Z hselasky $ */
 /*-
  * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
  *
@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.h 226709 2011-10-24 23:38:11Z yongari $
+ * $FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.h 334758 2018-06-07 07:33:46Z hselasky $
  */
 
 #ifndef _USB_ETHERNET_H_
@@ -112,6 +112,7 @@
 struct mii_data *uether_getmii(struct usb_ether *);
 void		*uether_getsc(struct usb_ether *);
 int		uether_ifattach(struct usb_ether *);
+void		uether_ifattach_wait(struct usb_ether *);
 void		uether_ifdetach(struct usb_ether *);
 int		uether_ifmedia_upd(struct ifnet *);
 void		uether_init(void *);



More information about the Midnightbsd-cvs mailing list