diff options
author | hselasky <hselasky@FreeBSD.org> | 2010-12-07 08:20:20 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2010-12-07 08:20:20 +0000 |
commit | 7b4239469b3f3ef3a4e1b7e86dea9441dce1257f (patch) | |
tree | f210ccfdd08e7cf4c7237f40c5b62d7870ccf835 /sys/dev/usb/usb_request.c | |
parent | a75fb4f20bed1222d48bb5ad12404479aadaad35 (diff) | |
download | FreeBSD-src-7b4239469b3f3ef3a4e1b7e86dea9441dce1257f.zip FreeBSD-src-7b4239469b3f3ef3a4e1b7e86dea9441dce1257f.tar.gz |
Re-add a status check which sneaked out during r214804.
This change can fix some USB error messages showing up
during bootup.
MFC after: 3 days
Approved by: thompsa (mentor)
Diffstat (limited to 'sys/dev/usb/usb_request.c')
-rw-r--r-- | sys/dev/usb/usb_request.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_request.c b/sys/dev/usb/usb_request.c index 60767388..293c4bf 100644 --- a/sys/dev/usb/usb_request.c +++ b/sys/dev/usb/usb_request.c @@ -793,6 +793,10 @@ usbd_req_reset_port(struct usb_device *udev, struct mtx *mtx, uint8_t port) if (err) { goto done; } + /* if the device disappeared, just give up */ + if (!(UGETW(ps.wPortStatus) & UPS_CURRENT_CONNECT_STATUS)) { + goto done; + } /* check if reset is complete */ if (UGETW(ps.wPortChange) & UPS_C_PORT_RESET) { break; |