Skip to contentSkip to conversation

The evilness of struct usb_device->auto_pm

DISCUSSION Alan Stern 1 participant 1 message Sep 27, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Alan Stern

author
#1 lore raw
Quoted 10 lines · Oliver Neukum

Hi,

doing autosuspend for the storage driver, this feature was a sore point. At some point we have to cross subsystem borders when doing runtime suspend on a subtree of the device tree. Drivers need to know whether they are doing a system wide suspend or a runtime suspend. The locking requirements at the very least are different.
We need a standardised way to tell drivers what kind of suspension they are dealing with. So I think it has to move into the generic struct device or become a part of the message parameter.

If it goes anywhere, it ought to be in the message parameter. My reason for putting it in struct usb_device originally was because there was no other choice at the time.

But there's a problem, in that the resume methods don't take a message parameter. So they wouldn't know whether they were doing a runtime resume or a system resume.

Alan Stern