diff options
author | Florent Thoumie <flz@FreeBSD.org> | 2005-12-05 01:51:28 +0000 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2005-12-05 01:51:28 +0000 |
commit | 645cf3805a4f0407f512d93442d6f71d217f2789 (patch) | |
tree | 78c381b9c7df6f57e3327c64e60af16ecb6a1d9d /sys/dev/usb/usb_subr.c | |
parent | 717f7d59624998ce1fe96536b9570b8171b63e0d (diff) | |
download | src-645cf3805a4f0407f512d93442d6f71d217f2789.tar.gz src-645cf3805a4f0407f512d93442d6f71d217f2789.zip |
- 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
Notes
Notes:
svn path=/head/; revision=153098
Diffstat (limited to 'sys/dev/usb/usb_subr.c')
-rw-r--r-- | sys/dev/usb/usb_subr.c | 28 |
1 files changed, 16 insertions, 12 deletions
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); } |