Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb usbd_setup_pipe(): Don't call usbd_clear_endpoin...



details:   https://anonhg.NetBSD.org/src/rev/51ae3c301fa2
branches:  trunk
changeset: 584511:51ae3c301fa2
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Wed Sep 21 20:17:22 2005 +0000

description:
usbd_setup_pipe(): Don't call usbd_clear_endpoint_stall(). It's not
necessary for normal devices, and it prevents some common (but
apparantly buggy) devices from working, including the Apple iPod (mini
and photo) and certain M-Systems DiskOnKey flash devices.

If (also buggy) devices resurface that need this when they are
attached, they can be addressed, ideally in each device's driver.

diffstat:

 sys/dev/usb/usb_subr.c |  13 ++-----------
 1 files changed, 2 insertions(+), 11 deletions(-)

diffs (34 lines):

diff -r 1ad3b75e1d7e -r 51ae3c301fa2 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c    Wed Sep 21 19:08:44 2005 +0000
+++ b/sys/dev/usb/usb_subr.c    Wed Sep 21 20:17:22 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_subr.c,v 1.129 2005/08/26 12:42:11 drochner Exp $  */
+/*     $NetBSD: usb_subr.c,v 1.130 2005/09/21 20:17:22 nathanw 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>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.129 2005/08/26 12:42:11 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.130 2005/09/21 20:17:22 nathanw Exp $");
 
 #include "opt_usbverbose.h"
 
@@ -756,15 +756,6 @@
                free(p, M_USB);
                return (err);
        }
-       /* 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. */
-               if (err && err != USBD_STALLED) {
-                       printf("usbd_setup_pipe: failed to start endpoint, %s\n", usbd_errstr(err));
-                       return (err);
-               }
-       }
        *pipe = p;
        return (USBD_NORMAL_COMPLETION);
 }



Home | Main Index | Thread Index | Old Index