usb/86438: Fix for non-working iPod over USB is in NetBSD CVS

Josh Elsasser josh at elsasser.org
Wed Sep 21 16:40:05 PDT 2005


>Number:         86438
>Category:       usb
>Synopsis:       Fix for non-working iPod over USB is in NetBSD CVS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-usb
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 21 23:40:04 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Josh Elsasser
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:


System: FreeBSD 5.4-STABLE #10: Wed Sep 21 18:14:39 EDT 2005
    joshe at loki.nat.elsasser.org:/usr/src/sys/i386/compile/LOKI



>Description:


A recent commit to the NetBSD USB code allows my iPod, which has never worked over USB in FreeBSD or NetBSD, to attach and function normally.

Here is the text of the commit message, rev 1.30 of sys/dev/usb/usb_subr.c:

Module Name:    src
Committed By:   nathanw
Date:           Wed Sep 21 20:17:22 UTC 2005

Modified Files:
        src/sys/dev/usb: usb_subr.c

Log Message:
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.


>How-To-Repeat:





>Fix:


$ cvs -d :pserver:anoncvs at anoncvs.netbsd.org:/cvsroot rdiff -u -r1.129 -r1.130 src/sys/dev/usb/usb_subr.c
diff -u src/sys/dev/usb/usb_subr.c:1.129 src/sys/dev/usb/usb_subr.c:1.130
--- src/sys/dev/usb/usb_subr.c:1.129	Fri Aug 26 12:42:11 2005
+++ src/sys/dev/usb/usb_subr.c	Wed Sep 21 20:17:22 2005
@@ -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);
 }



>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-usb mailing list