summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_subr.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2006-02-19 14:48:02 +0000
committeriedowse <iedowse@FreeBSD.org>2006-02-19 14:48:02 +0000
commitf2c6e2c553824c0f6cbb3dd15f883e69490ed30e (patch)
tree8804e11a64b7dd6857d825c5aa711219715371dc /sys/dev/usb/usb_subr.c
parent8fac408a7262b12dce6d506344068ddc9964015c (diff)
downloadFreeBSD-src-f2c6e2c553824c0f6cbb3dd15f883e69490ed30e.zip
FreeBSD-src-f2c6e2c553824c0f6cbb3dd15f883e69490ed30e.tar.gz
Add a UQ_OPEN_CLEARSTALL quirk for devices that need a clear-stall
operation when a pipe is opened, and add an entry for the ST Micro biometric CPU. Submitted by: Fredrik Lindberg MFC after: 1 week
Diffstat (limited to 'sys/dev/usb/usb_subr.c')
-rw-r--r--sys/dev/usb/usb_subr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index bbb2b78..2ec453e 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -780,6 +780,18 @@ usbd_setup_pipe(usbd_device_handle dev, usbd_interface_handle iface,
return (err);
}
+ if (dev->quirks->uq_flags & UQ_OPEN_CLEARSTALL) {
+ /* Clear any stall and make sure DATA0 toggle will be used next. */
+ if (UE_GET_ADDR(ep->edesc->bEndpointAddress) != USB_CONTROL_ENDPOINT) {
+ err = usbd_clear_endpoint_stall(p);
+ if (err && err != USBD_STALLED && err != USBD_TIMEOUT) {
+ printf("usbd_setup_pipe: failed to start "
+ "endpoint, %s\n", usbd_errstr(err));
+ return (err);
+ }
+ }
+ }
+
*pipe = p;
return (USBD_NORMAL_COMPLETION);
}
OpenPOWER on IntegriCloud