aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_device.h
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2010-10-04 23:18:05 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2010-10-04 23:18:05 +0000
commit963169b4af5d1a347560f060254e1df9541b2350 (patch)
treec082c15f2b4af936b99eda2cd4c67777fdf391ee /sys/dev/usb/usb_device.h
parent2ecb4e919f3df1edf00be35c9a85bd067495be2e (diff)
downloadsrc-963169b4af5d1a347560f060254e1df9541b2350.tar.gz
src-963169b4af5d1a347560f060254e1df9541b2350.zip
This commit adds full support for USB 3.0 devices in host and device
mode in the USB core. The patch mostly consists of updating the USB HUB code to support USB 3.0 HUBs. This patch also add some more USB controller methods to support more active-alike USB controllers like the XHCI which needs to be informed about various device state events. USB 3.0 HUBs are not tested yet, due to lack of hardware, but are believed to work. After this update the initial device descriptor is only read twice when we know that the bMaxPacketSize is too small for a single packet transfer of this descriptor. Approved by: thompsa (mentor)
Notes
Notes: svn path=/head/; revision=213435
Diffstat (limited to 'sys/dev/usb/usb_device.h')
-rw-r--r--sys/dev/usb/usb_device.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/usb/usb_device.h b/sys/dev/usb/usb_device.h
index e53afa251fd0..c8bc5eb95a18 100644
--- a/sys/dev/usb/usb_device.h
+++ b/sys/dev/usb/usb_device.h
@@ -151,6 +151,7 @@ struct usb_device {
uint8_t address; /* device addess */
uint8_t device_index; /* device index in "bus->devices" */
+ uint8_t controller_slot_id; /* controller specific value */
uint8_t curr_config_index; /* current configuration index */
uint8_t curr_config_no; /* current configuration number */
uint8_t depth; /* distance from root HUB */
@@ -169,11 +170,12 @@ struct usb_device {
struct usb_device_flags flags;
struct usb_endpoint_descriptor ctrl_ep_desc; /* for endpoint 0 */
+ struct usb_endpoint_ss_comp_descriptor ctrl_ep_comp_desc; /* for endpoint 0 */
struct usb_device_descriptor ddesc; /* device descriptor */
- char *serial; /* serial number */
- char *manufacturer; /* manufacturer string */
- char *product; /* product string */
+ char *serial; /* serial number, can be NULL */
+ char *manufacturer; /* manufacturer string, can be NULL */
+ char *product; /* product string, can be NULL */
#if USB_HAVE_COMPAT_LINUX
/* Linux compat */
@@ -213,8 +215,9 @@ void usb_free_device(struct usb_device *, uint8_t);
void usb_linux_free_device(struct usb_device *dev);
uint8_t usb_peer_can_wakeup(struct usb_device *udev);
struct usb_endpoint *usb_endpoint_foreach(struct usb_device *udev, struct usb_endpoint *ep);
-void usb_set_device_state(struct usb_device *udev,
- enum usb_dev_state state);
+void usb_set_device_state(struct usb_device *, enum usb_dev_state);
+enum usb_dev_state usb_get_device_state(struct usb_device *);
+
void usbd_enum_lock(struct usb_device *);
void usbd_enum_unlock(struct usb_device *);
void usbd_sr_lock(struct usb_device *);