diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-04-05 18:20:49 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-04-05 18:20:49 +0000 |
commit | d21a622bba09d8841faedb2b868bfbaf8df99c0c (patch) | |
tree | 3cf2863804b1271652221a79f7ee4b84733266b8 /sys/dev/usb/usb_bus.h | |
parent | f498dc2227c7edc88b3ba4fdfbbe30ec4205369a (diff) | |
download | FreeBSD-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.h | 14 |
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: */ |