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. Regards Oliver -- 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