diff options
author | flz <flz@FreeBSD.org> | 2005-12-05 01:51:28 +0000 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2005-12-05 01:51:28 +0000 |
commit | 7f18d28b2559b43fcf39ffedb4b96a9bbbb8a046 (patch) | |
tree | 78c381b9c7df6f57e3327c64e60af16ecb6a1d9d | |
parent | 034f1727af49b3867ed44080433345af7dfb0e77 (diff) | |
download | FreeBSD-src-7f18d28b2559b43fcf39ffedb4b96a9bbbb8a046.zip FreeBSD-src-7f18d28b2559b43fcf39ffedb4b96a9bbbb8a046.tar.gz |
- 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
-rw-r--r-- | sys/dev/usb/usb_quirks.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/usb_quirks.h | 1 | ||||
-rw-r--r-- | sys/dev/usb/usb_subr.c | 28 | ||||
-rw-r--r-- | sys/dev/usb/usbdevs | 2 |
4 files changed, 21 insertions, 12 deletions
diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c index 01c155f..fd05cff 100644 --- a/sys/dev/usb/usb_quirks.c +++ b/sys/dev/usb/usb_quirks.c @@ -79,6 +79,8 @@ Static const struct usbd_quirk_entry { { USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1, 0x009, { UQ_AU_NO_FRAC }}, { USB_VENDOR_SILICONPORTALS, USB_PRODUCT_SILICONPORTALS_YAPPHONE, 0x100, { UQ_AU_INP_ASYNC }}, + { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPOD3G, ANY, { UQ_BROKEN_IPOD }}, + { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPODVIDEO, ANY, { UQ_BROKEN_IPOD }}, /* XXX These should have a revision number, but I don't know what they are. */ { USB_VENDOR_HP, USB_PRODUCT_HP_895C, ANY, { UQ_BROKEN_BIDIR }}, { USB_VENDOR_HP, USB_PRODUCT_HP_880C, ANY, { UQ_BROKEN_BIDIR }}, diff --git a/sys/dev/usb/usb_quirks.h b/sys/dev/usb/usb_quirks.h index 4977bf6..6588ec0 100644 --- a/sys/dev/usb/usb_quirks.h +++ b/sys/dev/usb/usb_quirks.h @@ -54,6 +54,7 @@ struct usbd_quirks { #define UQ_AU_INP_ASYNC 0x0800 /* input is async despite claim of adaptive */ #define UQ_ASSUME_CM_OVER_DATA 0x1000 /* modem device breaks on cm over data */ #define UQ_BROKEN_BIDIR 0x2000 /* printer has broken bidir mode */ +#define UQ_BROKEN_IPOD 0x4000 /* iPod has something broken */ }; extern const struct usbd_quirks usbd_no_quirk; diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 6b11b44..d77ebc0 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); } diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 8e44b8f..76a26e6 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -642,6 +642,8 @@ product AOX USB101 0x0008 Ethernet /* Apple Computer products */ product APPLE OPTMOUSE 0x0302 Optical mouse product APPLE SPEAKERS 0x1101 Speakers +product APPLE IPOD3G 0x1203 iPod 3G +product APPLE IPODVIDEO 0x1209 iPod Video /* Asahi Optical products */ product ASAHIOPTICAL OPTIO230 0x0004 Digital camera |