From 645cf3805a4f0407f512d93442d6f71d217f2789 Mon Sep 17 00:00:00 2001 From: Florent Thoumie Date: Mon, 5 Dec 2005 01:51:28 +0000 Subject: - Add Product IDs for iPod 3G and iPod Video. - Add an USB quirk for iPods, da(4) devices are now successfully created. Approved by: ssouhlal MFC after: 1 week --- sys/dev/usb/usb_subr.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'sys/dev/usb/usb_subr.c') diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 6b11b448a34c..d77ebc0c1ce3 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -778,20 +778,24 @@ usbd_setup_pipe(usbd_device_handle dev, usbd_interface_handle iface, 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. - * 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); + + if (!(dev->quirks->uq_flags & UQ_BROKEN_IPOD)) { + /* 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); } -- cgit v1.2.3