Don't perform an endpoint stall clear every time a pipe is opened.
This should not be necessary, and it is known to confuse certain devices. Obtained from: NetBSD Requested by: many
This commit is contained in:
parent
23db0a33f7
commit
dd35c3642c
@ -779,23 +779,6 @@ usbd_setup_pipe(usbd_device_handle dev, usbd_interface_handle iface,
|
||||
return (err);
|
||||
}
|
||||
|
||||
if (!(dev->quirks->uq_flags & UQ_NO_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);
|
||||
/*
|
||||
* Some devices reject this command, so ignore a STALL.
|
||||
* Some device just time out on this command, so ignore
|
||||
* that too.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user