Re: [PATCH 2/3] usb: Take attribute avoid_reset_quirk out of usb device's attribute group

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

 



Oliver Neukum <oneukum@xxxxxxx> writes:
> On Monday 30 July 2012 22:35:37 Bjørn Mork wrote:
>> Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx> writes:
>>
>> > Possible solutions
>> > ------------------
>> >
>> >  - We need a new interface driver flag to indicate a driver is fine with
>> >    the port being powered off.  Something like "supports_power_off".
>> 
>> May work for some devices.  But what are the use cases? Which devices
>> will work better with such driver support than they will if you simply
>> unload the driver?
>
> uvc, some hid, some storage devices.

I don't know anything about storage devices, but forcing them to power
off sounds scary to me.  If that can be done safely with driver support
then I guess that's a good reason, yes.

For uvc and hid:  What's the advantage with driver support compared to
just unbinding?  When it comes to hid I would assume that most such
devices need remote wakeup to be able to sleep at all?

>> >    2. If the device is internal and suspended, power off the port if all
>> >       the following are true:
>> >
>> >       a) all interface drivers have supports_power_off set, or no
>> > 	 interface drivers are bound and usbfs has not claimed the
>> > 	 device.
>> >       b) remote wakeup is disabled
>> >       c) USB_QUIRK_RESET_MORPHS is not set
>> 
>> Why can't that be a userspace decision?  I.e. drop all this policy in
>> the kernel stuff, and just implement:
>
> We cannot. User space doesn't know and cannot know when remote wakeup
> is needed.

So?  Return an error.  It's not like you are going to guarantee this
operation will succeed anyway.  Or if you worry about being able to
power off the port as soon as possible: Replicate the autosuspend
functionality, with userspace controlled enable and delay instead of
making it an on/off switch.

But please put the control of which ports to enable this feature for in
the hands of the user.


Bjørn
--
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