Re: [PATCH 3/3] usb: Change persist_enabled when attribute avoid_reset_quirk is modified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012年07月30日 15:24, Oliver Neukum wrote:
On Monday 30 July 2012 11:34:11 Lan Tianyu wrote:
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -209,10 +209,13 @@ set_avoid_reset_quirk(struct device *dev, struct device_attribute *attr,
         if (sscanf(buf, "%d",&val) != 1 || val<  0 || val>  1)
                 return -EINVAL;
         usb_lock_device(udev);
-       if (val)
+       if (val) {
                 udev->quirks |= USB_QUIRK_RESET_MORPHS;
-       else
+               udev->persist_enabled = 0;
+       } else {
                 udev->quirks&= ~USB_QUIRK_RESET_MORPHS;
+               udev->persist_enabled = 1;
+       }
         usb_unlock_device(udev);
         return count;

Hi,

this is on second thought quite problematic. If user space has
disabled the persist feature it must stay disabled, even if
the quirk setting is removed.
Yeah. You are right. So how about remain the persist_enabled 0 or
do nothing with persist_enabled when quirk settting is removed.

	Regards
		Oliver


--
Best Regards
Tianyu Lan
linux kernel enabling team
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux