From 7c2ad04d48a487df89ca40978b639bd45f975b53 Mon Sep 17 00:00:00 2001 From: Phil Dibowitz Date: Thu, 22 Jul 2010 00:05:01 +0200 Subject: [PATCH] --- yaml --- r: 208034 b: refs/heads/master c: 93362a875fc69881ae69299efaf19a55a1f57db0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/hub.c | 6 +++++- trunk/drivers/usb/core/quirks.c | 3 +++ trunk/include/linux/usb/quirks.h | 4 ++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index ee29e90a793d..6a2ae6c4ac80 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 33d973ad88ceb83ed1449592b7574b5b5bb33ac6 +refs/heads/master: 93362a875fc69881ae69299efaf19a55a1f57db0 diff --git a/trunk/drivers/usb/core/hub.c b/trunk/drivers/usb/core/hub.c index d337ef80bf43..84c1897188d2 100644 --- a/trunk/drivers/usb/core/hub.c +++ b/trunk/drivers/usb/core/hub.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1802,7 +1803,6 @@ int usb_new_device(struct usb_device *udev) pm_runtime_set_active(&udev->dev); pm_runtime_enable(&udev->dev); - usb_detect_quirks(udev); err = usb_enumerate_device(udev); /* Read descriptors */ if (err < 0) goto fail; @@ -3114,6 +3114,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, if (status < 0) goto loop; + usb_detect_quirks(udev); + if (udev->quirks & USB_QUIRK_DELAY_INIT) + msleep(1000); + /* consecutive bus-powered hubs aren't reliable; they can * violate the voltage drop budget. if the new child has * a "powered" LED, users should notice we didn't enable it diff --git a/trunk/drivers/usb/core/quirks.c b/trunk/drivers/usb/core/quirks.c index db99c084df92..25719da45e33 100644 --- a/trunk/drivers/usb/core/quirks.c +++ b/trunk/drivers/usb/core/quirks.c @@ -38,6 +38,9 @@ static const struct usb_device_id usb_quirk_list[] = { /* Creative SB Audigy 2 NX */ { USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Logitech Harmony 700-series */ + { USB_DEVICE(0x046d, 0xc122), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Philips PSC805 audio device */ { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME }, diff --git a/trunk/include/linux/usb/quirks.h b/trunk/include/linux/usb/quirks.h index 16b7f3347545..3e93de7ecbc3 100644 --- a/trunk/include/linux/usb/quirks.h +++ b/trunk/include/linux/usb/quirks.h @@ -26,4 +26,8 @@ and can't handle talking to these interfaces */ #define USB_QUIRK_HONOR_BNUMINTERFACES 0x00000020 +/* device needs a pause during initialization, after we read the device + descriptor */ +#define USB_QUIRK_DELAY_INIT 0x00000040 + #endif /* __LINUX_USB_QUIRKS_H */