aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/core/driver.c4
-rw-r--r--drivers/usb/core/hub.c5
-rw-r--r--drivers/usb/core/quirks.c3
-rw-r--r--include/linux/usb/quirks.h3
4 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 12dd986bdffd..02d6db61c940 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -24,6 +24,7 @@
24 24
25#include <linux/device.h> 25#include <linux/device.h>
26#include <linux/usb.h> 26#include <linux/usb.h>
27#include <linux/usb/quirks.h>
27#include <linux/workqueue.h> 28#include <linux/workqueue.h>
28#include "hcd.h" 29#include "hcd.h"
29#include "usb.h" 30#include "usb.h"
@@ -835,6 +836,9 @@ static int usb_resume_device(struct usb_device *udev)
835 goto done; 836 goto done;
836 } 837 }
837 838
839 if (udev->quirks & USB_QUIRK_RESET_RESUME)
840 udev->reset_resume = 1;
841
838 udriver = to_usb_device_driver(udev->dev.driver); 842 udriver = to_usb_device_driver(udev->dev.driver);
839 status = udriver->resume(udev); 843 status = udriver->resume(udev);
840 844
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 51d2d304568b..d37ad083d5ef 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2939,6 +2939,11 @@ static int config_descriptors_changed(struct usb_device *udev)
2939 * this from a driver probe() routine after downloading new firmware. 2939 * this from a driver probe() routine after downloading new firmware.
2940 * For calls that might not occur during probe(), drivers should lock 2940 * For calls that might not occur during probe(), drivers should lock
2941 * the device using usb_lock_device_for_reset(). 2941 * the device using usb_lock_device_for_reset().
2942 *
2943 * Locking exception: This routine may also be called from within an
2944 * autoresume handler. Such usage won't conflict with other tasks
2945 * holding the device lock because these tasks should always call
2946 * usb_autopm_resume_device(), thereby preventing any unwanted autoresume.
2942 */ 2947 */
2943int usb_reset_device(struct usb_device *udev) 2948int usb_reset_device(struct usb_device *udev)
2944{ 2949{
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 739f520908aa..f37fa012f329 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -35,6 +35,9 @@ static const struct usb_device_id usb_quirk_list[] = {
35 /* Elsa MicroLink 56k (V.250) */ 35 /* Elsa MicroLink 56k (V.250) */
36 { USB_DEVICE(0x05cc, 0x2267), .driver_info = USB_QUIRK_NO_AUTOSUSPEND }, 36 { USB_DEVICE(0x05cc, 0x2267), .driver_info = USB_QUIRK_NO_AUTOSUSPEND },
37 37
38 /* Philips PSC805 audio device */
39 { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME },
40
38 { } /* terminating entry must be last */ 41 { } /* terminating entry must be last */
39}; 42};
40 43
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h
index 6bac8faacbc6..8da374caf582 100644
--- a/include/linux/usb/quirks.h
+++ b/include/linux/usb/quirks.h
@@ -9,3 +9,6 @@
9 9
10/* string descriptors must not be fetched using a 255-byte read */ 10/* string descriptors must not be fetched using a 255-byte read */
11#define USB_QUIRK_STRING_FETCH_255 0x00000002 11#define USB_QUIRK_STRING_FETCH_255 0x00000002
12
13/* device can't resume correctly so reset it instead */
14#define USB_QUIRK_RESET_RESUME 0x00000004