diff options
author | iedowse <iedowse@FreeBSD.org> | 2006-02-19 14:48:02 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2006-02-19 14:48:02 +0000 |
commit | f2c6e2c553824c0f6cbb3dd15f883e69490ed30e (patch) | |
tree | 8804e11a64b7dd6857d825c5aa711219715371dc /sys/dev/usb/usb_subr.c | |
parent | 8fac408a7262b12dce6d506344068ddc9964015c (diff) | |
download | FreeBSD-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.c | 12 |
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); } |