Re: [RFC PATCH] USB: enable "power/wakeup" to control remote wakeup in the runtime suspend

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

 



On Wed, 18 Jul 2012, Oliver Neukum wrote:

> On Wednesday 18 July 2012 12:40:38 Alan Stern wrote:
>  
> > Oliver, you seem to be arguing both sides of this discussion.  You
> 
> But there are more than two sides in this discussion.
> 
> > point out the the power-off operation is too dangerous in general for 
> > the kernel to do it, and now you say that it's too racy for userspace 
> > to do it.
> 
> It is too dangerous in general. Therefore it may be safe in particular.
>  
> > Are we to infer that you don't want it to be done at all?
> 
> No, now that I think about it an attribute for the drivers is necessary.
> Like drivers have "supports_autosuspend" they also should have 
> "supports_power_off". In addition it is necessary for ports to have
> an attribute in sysfs which allows user space to block power off.
> 
> And it is a bit complicated. Power may be cut, if
> 
> a) a port is internal and unpluggable, or
> 
> b) a port is internal and it's interfaces' drivers set "supports_power_off", unless:
> 
> 1) remote wakeup is requested
> 2) user space has blocked it via the new sysfs attribute
> 3) USB_QUIRK_RESET_MORPHS is set

The same is true for external ports if they are marked as 
non-removable.  For example, consider a compound keyboard/mouse device 
with a built-in hub.  The connections from the keyboard and the mouse 
to the hub are internal and not removable.

Alan Stern

--
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