Re: [PATCH 10/10] usb: add usb port's pm qos flags request to change NO_POWER_OFF flag

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

 



On 2012年11月29日 03:42, Alan Stern wrote:
> On Sat, 17 Nov 2012, Lan Tianyu wrote:
> 
>> Some usb devices can't be resumed correctly after power off. This
>> patch is to add pm qos flags request to change NO_POWER_OFF and
>> provide usb_device_allow_power_off() for device drivers to allow or
>> prohibit usb core to power off the device.
> 
> What happens if there are two drivers bound to two different 
> interfaces, and they both call usb_device_allow_power_off(false), and 
> then one of the drivers is unbound and calls 
> usb_device_allow_power_off(on)?
> 
> Also, instead of using PM QOS flags for this, why not simply have
> usb_device_allow_power_off call pm_runtime_{get,put}_sync on the port 
> device?

If we do this, I think we should add a flag to record whether the port
has been prevent from power off to avoid pm_runtime_get() more than one
time. Since this function may be invoked many time.

> 
> Alan Stern
> 


-- 
Best regards
Tianyu Lan
--
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