Re: [RFC PATCH 4/5] usb: add runtime pm support for usb port device

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

 



On Fri, 9 Nov 2012, Lan Tianyu wrote:

> When pm qos flags is changing, the pm core will keep device not
> in RPM_SUSPEND via pm_runtime_get_sync/put(dev). When the flags are
> changed, this will affect usb device status. If NO_POWER_OFF flag was
> set when the device was power off, it would need to be resumed and
> suspended again without power off. If NO_POWER_OFF flag was cleared
> when the device was suspended without power off, it would need to be
> resumed and suspended again with power off inorder to save more power.
> 
> This patch is to add runtime pm callback for usb port device. In the callback,
> usb device attached to the port will be resumed and suspended.

No, this is completely the wrong way around.  The device's resume 
routine should force the port to resume, not the reverse.  Think of the 
port device as a parent of the USB device (even though it's not 
represented that way in the device hierarchy) and you'll see why.

Also, all this port stuff is making hub.c a real mess.  Before going 
any farther, can you split it all out into a separate source file?

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