summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_dev.c
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2013-10-27 10:09:53 +0000
committerhselasky <hselasky@FreeBSD.org>2013-10-27 10:09:53 +0000
commit27bcb2607f5ad6dc7aa195e4f6d2ee8c8f57cf19 (patch)
tree275501c1c0479f4a350fb3bf6cec88a23cdbb6dd /sys/dev/usb/usb_dev.c
parent03a9e9340c31c91507daf29df9fb93bd34c8eb86 (diff)
downloadFreeBSD-src-27bcb2607f5ad6dc7aa195e4f6d2ee8c8f57cf19.zip
FreeBSD-src-27bcb2607f5ad6dc7aa195e4f6d2ee8c8f57cf19.tar.gz
Fix a deadlock when trying to power off a USB device. The deadlock
happens because the code in question is trying to modify the parent USB port registers outside the USB explore thread. MFC after: 3 days
Diffstat (limited to 'sys/dev/usb/usb_dev.c')
-rw-r--r--sys/dev/usb/usb_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_dev.c b/sys/dev/usb/usb_dev.c
index 9bf430b..9e3cef5 100644
--- a/sys/dev/usb/usb_dev.c
+++ b/sys/dev/usb/usb_dev.c
@@ -1099,7 +1099,7 @@ usb_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int fflag, struct thread*
/* Wait for re-enumeration, if any */
- while (f->udev->re_enumerate_wait != 0) {
+ while (f->udev->re_enumerate_wait != USB_RE_ENUM_DONE) {
usb_unref_device(cpd, &refs);
OpenPOWER on IntegriCloud