diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-01-13 15:21:11 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-01-13 15:21:11 +0000 |
commit | c4e62298f96f62da25d9d9005eb06674f3813ec2 (patch) | |
tree | 2ed1bd7186b681c28c7635d5d7e144cf1152435e /sys/dev/usb/usb_device.h | |
parent | 94e08728590f78ad237a584e9176b460c7d3e331 (diff) | |
download | FreeBSD-src-c4e62298f96f62da25d9d9005eb06674f3813ec2.zip FreeBSD-src-c4e62298f96f62da25d9d9005eb06674f3813ec2.tar.gz |
Implement better error recovery for Transaction Translators, TTs,
found in High Speed USB HUBs which translate from High Speed USB into
FULL or LOW speed USB. In some rare cases SPLIT transactions might get
lost, which might leave the TT in an unknown state. Whenever we detect
such an error try to issue either a clear TT buffer request, or if
that is not possible reset the whole TT.
MFC after: 1 week
Diffstat (limited to 'sys/dev/usb/usb_device.h')
-rw-r--r-- | sys/dev/usb/usb_device.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_device.h b/sys/dev/usb/usb_device.h index c1ec799..0763663 100644 --- a/sys/dev/usb/usb_device.h +++ b/sys/dev/usb/usb_device.h @@ -53,7 +53,7 @@ struct usb_symlink; /* UGEN */ #define USB_UNCFG_FLAG_NONE 0x00 #define USB_UNCFG_FLAG_FREE_EP0 0x02 /* endpoint zero is freed */ -struct usb_clear_stall_msg { +struct usb_udev_msg { struct usb_proc_msg hdr; struct usb_device *udev; }; @@ -179,8 +179,8 @@ union usb_device_scratch { * these structures for every USB device. */ struct usb_device { - struct usb_clear_stall_msg cs_msg[2]; /* generic clear stall - * messages */ + /* generic clear stall message */ + struct usb_udev_msg cs_msg[2]; struct sx enum_sx; struct sx sr_sx; struct mtx device_mtx; @@ -316,4 +316,10 @@ void usbd_sr_lock(struct usb_device *); void usbd_sr_unlock(struct usb_device *); uint8_t usbd_enum_is_locked(struct usb_device *); +#if USB_HAVE_TT_SUPPORT +void uhub_tt_buffer_reset_async_locked(struct usb_device *, struct usb_endpoint *); +#endif + +uint8_t uhub_count_active_host_ports(struct usb_device *, enum usb_dev_speed); + #endif /* _USB_DEVICE_H_ */ |