svn commit: r250560 - in stable/9/sys/dev/usb: . controller

Hans Petter Selasky hselasky at FreeBSD.org
Wed May 15 04:39:12 UTC 2013


Author: hselasky
Date: Sun May 12 12:13:23 2013
New Revision: 250560
URL: http://svnweb.freebsd.org/changeset/base/250560

Log:
  MFC r249795:
  Add convenience wrapper functions to run callbacks in the context of the
  USB explore thread.

Modified:
  stable/9/sys/dev/usb/controller/usb_controller.c
  stable/9/sys/dev/usb/usb_process.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- stable/9/sys/dev/usb/controller/usb_controller.c	Sun May 12 12:09:08 2013	(r250559)
+++ stable/9/sys/dev/usb/controller/usb_controller.c	Sun May 12 12:13:23 2013	(r250560)
@@ -877,3 +877,28 @@ usb_bus_mem_free_all(struct usb_bus *bus
 
 	mtx_destroy(&bus->bus_mtx);
 }
+
+/* convenience wrappers */
+void
+usb_proc_explore_mwait(struct usb_device *udev, void *pm1, void *pm2)
+{
+	usb_proc_mwait(&udev->bus->explore_proc, pm1, pm2);
+}
+
+void	*
+usb_proc_explore_msignal(struct usb_device *udev, void *pm1, void *pm2)
+{
+	return (usb_proc_msignal(&udev->bus->explore_proc, pm1, pm2));
+}
+
+void
+usb_proc_explore_lock(struct usb_device *udev)
+{
+	USB_BUS_LOCK(udev->bus);
+}
+
+void
+usb_proc_explore_unlock(struct usb_device *udev)
+{
+	USB_BUS_UNLOCK(udev->bus);
+}

Modified: stable/9/sys/dev/usb/usb_process.h
==============================================================================
--- stable/9/sys/dev/usb/usb_process.h	Sun May 12 12:09:08 2013	(r250559)
+++ stable/9/sys/dev/usb/usb_process.h	Sun May 12 12:13:23 2013	(r250560)
@@ -42,6 +42,7 @@
 /* structure prototypes */
 
 struct usb_proc_msg;
+struct usb_device;
 
 /*
  * The following structure defines the USB process.
@@ -79,4 +80,9 @@ void	usb_proc_free(struct usb_process *u
 void   *usb_proc_msignal(struct usb_process *up, void *pm0, void *pm1);
 void	usb_proc_rewakeup(struct usb_process *up);
 
+void	usb_proc_explore_mwait(struct usb_device *, void *, void *);
+void   *usb_proc_explore_msignal(struct usb_device *, void *, void *);
+void	usb_proc_explore_lock(struct usb_device *);
+void	usb_proc_explore_unlock(struct usb_device *);
+
 #endif					/* _USB_PROCESS_H_ */
_______________________________________________
svn-src-all at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"


More information about the svn-src-stable-9 mailing list