svn commit: r250562 - in stable/8/sys/dev/usb: . controller

Hans Petter Selasky hselasky at FreeBSD.org
Wed May 15 05:27:58 UTC 2013


Author: hselasky
Date: Sun May 12 12:24:29 2013
New Revision: 250562
URL: http://svnweb.freebsd.org/changeset/base/250562

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

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

Modified: stable/8/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- stable/8/sys/dev/usb/controller/usb_controller.c	Sun May 12 12:20:04 2013	(r250561)
+++ stable/8/sys/dev/usb/controller/usb_controller.c	Sun May 12 12:24:29 2013	(r250562)
@@ -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/8/sys/dev/usb/usb_process.h
==============================================================================
--- stable/8/sys/dev/usb/usb_process.h	Sun May 12 12:20:04 2013	(r250561)
+++ stable/8/sys/dev/usb/usb_process.h	Sun May 12 12:24:29 2013	(r250562)
@@ -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-8 mailing list