usb: convert USB_QUIRK_RESET_MORPHS to USB_QUIRK_RESET
authorLan Tianyu <tianyu.lan@intel.com>
Fri, 17 Aug 2012 08:44:56 +0000 (16:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Aug 2012 21:38:08 +0000 (14:38 -0700)
Since the attribute avoid_reset_quirk is work for all devices including
those devices that can't morph, convert USB_QUIRK_RESET_MORPHS to
USB_QUIRK_RESET.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/quirks.c
drivers/usb/core/sysfs.c
drivers/usb/storage/transport.c
include/linux/usb/quirks.h

index f15501f4c585694c0c513eac78f692558ae8720f..2dbb5154f356b01baf3a8f9da9f1aa855e2ad11f 100644 (file)
@@ -205,7 +205,7 @@ void usb_detect_quirks(struct usb_device *udev)
         * for all devices.  It will affect things like hub resets
         * and EMF-related port disables.
         */
-       if (!(udev->quirks & USB_QUIRK_RESET_MORPHS))
+       if (!(udev->quirks & USB_QUIRK_RESET))
                udev->persist_enabled = 1;
 #endif /* CONFIG_PM */
 }
index d6c49d9ed4e03864fe500915f589149105c8cc10..818e4a024d0d8d259c1fffa8f93c60806f8a64c1 100644 (file)
@@ -196,7 +196,7 @@ show_avoid_reset_quirk(struct device *dev, struct device_attribute *attr, char *
        struct usb_device *udev;
 
        udev = to_usb_device(dev);
-       return sprintf(buf, "%d\n", !!(udev->quirks & USB_QUIRK_RESET_MORPHS));
+       return sprintf(buf, "%d\n", !!(udev->quirks & USB_QUIRK_RESET));
 }
 
 static ssize_t
@@ -210,9 +210,9 @@ set_avoid_reset_quirk(struct device *dev, struct device_attribute *attr,
                return -EINVAL;
        usb_lock_device(udev);
        if (val)
-               udev->quirks |= USB_QUIRK_RESET_MORPHS;
+               udev->quirks |= USB_QUIRK_RESET;
        else
-               udev->quirks &= ~USB_QUIRK_RESET_MORPHS;
+               udev->quirks &= ~USB_QUIRK_RESET;
        usb_unlock_device(udev);
        return count;
 }
index c70109e5d60bb0f409df74187e3dabc5a53f4979..c0543c83923e30fab82b82698471d200ec1be47d 100644 (file)
@@ -1331,7 +1331,7 @@ int usb_stor_port_reset(struct us_data *us)
        int result;
 
        /*for these devices we must use the class specific method */
-       if (us->pusb_dev->quirks & USB_QUIRK_RESET_MORPHS)
+       if (us->pusb_dev->quirks & USB_QUIRK_RESET)
                return -EPERM;
 
        result = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf);
index 3e93de7ecbc365c59e680f626990d8be80df0f43..52f944dfe2fd68305f1f19a4f08c018e9226595c 100644 (file)
@@ -19,8 +19,8 @@
 /* device can't handle its Configuration or Interface strings */
 #define USB_QUIRK_CONFIG_INTF_STRINGS  0x00000008
 
-/*device will morph if reset, don't use reset for handling errors */
-#define USB_QUIRK_RESET_MORPHS         0x00000010
+/* device can't be reset(e.g morph devices), don't use reset */
+#define USB_QUIRK_RESET                        0x00000010
 
 /* device has more interface descriptions than the bNumInterfaces count,
    and can't handle talking to these interfaces */