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 2012年07月19日 14:37, Oliver Neukum wrote:
On Wednesday 18 July 2012 15:07:14 Sarah Sharp wrote:
On Wed, Jul 18, 2012 at 09:03:59PM +0200, Oliver Neukum wrote:

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

Yes, that sounds like a good kernel policy.  Thanks for pointing out the
USB_QUIRK_RESET_MORPHS; I didn't know we had a specific quirk for
devices that will morph into a different class of USB devices on a
reset.

It is supposed to be set (from user space) for 3G cards that feature a
mini-SD card reader which the storage driver would reset during error
handling.

What if the user really wants the bluetooth device off?  I have only
used the bluetooth on my laptop once in the year I've had it.  Whenever I
boot my Ubuntu box, I go up to the bluetooth icon in the tray and turn
it off.  It would be nice at that point to have the bluetooth driver
unloaded and the port turned completely off.

Unloading the driver is a user space issue.
But you are right there is a missing case
hi all:
	I have a question About device which needs a firmware when connected.
	If the port powered off when it was suspend, the port would power on
when system try to access the device. What happen if try to resume the device,
guess it will fail. usb core would disconnect the device and renumerate the device.
The driver loaded again with firmware and the device still could work, is Right?
	I have no a such device to do test. Just from guess. The point is whether
resuming the device without loading firmware will fail.
	
--
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