summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_bus.h
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-04-05 18:20:49 +0000
committerthompsa <thompsa@FreeBSD.org>2009-04-05 18:20:49 +0000
commitd21a622bba09d8841faedb2b868bfbaf8df99c0c (patch)
tree3cf2863804b1271652221a79f7ee4b84733266b8 /sys/dev/usb/usb_bus.h
parentf498dc2227c7edc88b3ba4fdfbbe30ec4205369a (diff)
downloadFreeBSD-src-d21a622bba09d8841faedb2b868bfbaf8df99c0c.zip
FreeBSD-src-d21a622bba09d8841faedb2b868bfbaf8df99c0c.tar.gz
MFp4 //depot/projects/usb@159922
Refactor how we interface with the root HUB. This cuts around 1200 lines of code totally and saves one thread per USB bus. Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/usb_bus.h')
-rw-r--r--sys/dev/usb/usb_bus.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_bus.h b/sys/dev/usb/usb_bus.h
index 8a4575f..ac84950 100644
--- a/sys/dev/usb/usb_bus.h
+++ b/sys/dev/usb/usb_bus.h
@@ -45,6 +45,17 @@ struct usb2_bus_stat {
};
/*
+ * The following structure is used to keep the state of a standard
+ * root transfer.
+ */
+struct usb2_sw_transfer {
+ struct usb2_device_request req;
+ uint8_t *ptr;
+ uint16_t len;
+ usb2_error_t err;
+};
+
+/*
* The following structure defines an USB BUS. There is one USB BUS
* for every Host or Device controller.
*/
@@ -52,7 +63,7 @@ struct usb2_bus {
struct usb2_bus_stat stats_err;
struct usb2_bus_stat stats_ok;
struct usb2_process explore_proc;
- struct usb2_process roothub_proc;
+ struct usb2_sw_transfer roothub_req;
struct root_hold_token *bus_roothold;
/*
* There are two callback processes. One for Giant locked
@@ -64,7 +75,6 @@ struct usb2_bus {
struct usb2_bus_msg explore_msg[2];
struct usb2_bus_msg detach_msg[2];
struct usb2_bus_msg attach_msg[2];
- struct usb2_bus_msg roothub_msg[2];
/*
* This mutex protects the USB hardware:
*/
OpenPOWER on IntegriCloud