diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-06-08 20:10:29 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-06-08 20:10:29 +0000 |
commit | 35c04fd76f2de14a0dc3e0fdcbccef4a181ea803 (patch) | |
tree | 6b6fd9094c2096380007cac3ef2c1b6c0201594f /sys/dev/usb/usbdi.h | |
parent | 6106e186e66f75454d6257dad160bddf21d99d2a (diff) | |
download | FreeBSD-src-35c04fd76f2de14a0dc3e0fdcbccef4a181ea803.zip FreeBSD-src-35c04fd76f2de14a0dc3e0fdcbccef4a181ea803.tar.gz |
Resolve a deadlock setting the USB configuration index from userspace
on USB HUBs by moving the code into the USB explore threads. The
deadlock happens because child devices of the USB HUB don't have the
expected reference count when called from outside the explore
thread. Only the HUB device itself, which the IOCTL interface locks,
gets the correct reference count.
MFC after: 3 days
Diffstat (limited to 'sys/dev/usb/usbdi.h')
-rw-r--r-- | sys/dev/usb/usbdi.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index f4c6cf9..09b0ca7 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -586,6 +586,8 @@ void usbd_m_copy_in(struct usb_page_cache *cache, usb_frlength_t dst_offset, void usbd_frame_zero(struct usb_page_cache *cache, usb_frlength_t offset, usb_frlength_t len); void usbd_start_re_enumerate(struct usb_device *udev); +usb_error_t + usbd_start_set_config(struct usb_device *, uint8_t); int usb_fifo_attach(struct usb_device *udev, void *priv_sc, struct mtx *priv_mtx, struct usb_fifo_methods *pm, |