Allow a device to reject CLEAR_FEATURE ENDPOINT_STALL (with a STALL) -- the

assumption being that the device will never use a STALL of a non-control pipe,
I guess.
This commit is contained in:
mycroft 2003-09-23 21:44:42 +00:00
parent df8e298ddb
commit ab223e99bc
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: usb_subr.c,v 1.105 2003/09/12 16:22:57 mycroft Exp $ */ /* $NetBSD: usb_subr.c,v 1.106 2003/09/23 21:44:42 mycroft Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/* /*
@ -39,7 +39,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.105 2003/09/12 16:22:57 mycroft Exp $"); __KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.106 2003/09/23 21:44:42 mycroft Exp $");
#include "opt_usbverbose.h" #include "opt_usbverbose.h"
@ -778,7 +778,8 @@ usbd_setup_pipe(usbd_device_handle dev, usbd_interface_handle iface,
/* Clear any stall and make sure DATA0 toggle will be used next. */ /* Clear any stall and make sure DATA0 toggle will be used next. */
if (UE_GET_ADDR(ep->edesc->bEndpointAddress) != USB_CONTROL_ENDPOINT) { if (UE_GET_ADDR(ep->edesc->bEndpointAddress) != USB_CONTROL_ENDPOINT) {
err = usbd_clear_endpoint_stall(p); err = usbd_clear_endpoint_stall(p);
if (err) { /* Some devices reject this command, so ignore a STALL. */
if (err && err != USBD_STALLED) {
printf("usbd_setup_pipe: failed to start endpoint, %s\n", usbd_errstr(err)); printf("usbd_setup_pipe: failed to start endpoint, %s\n", usbd_errstr(err));
return (err); return (err);
} }