Hi! > I'm trying to get my mind around what's needed for drivers (USB drivers in > particular) to implement the new PM model. Several aspects are still > unclear. > > First, a couple of questions. Is it guaranteed that the FREEZE events > are only sent by the PM core, always to every device in the tree, and only > for system-wide state changes? Yes, I think so. > Would it be a good idea to store in dev->power a flag indicating whether > or not the device is currently frozen? Unlike the power_state, being > frozen has a reasonably well-defined meaning for every device. Well, if such info was stored, would it be usefull somewhere? > So whenever the HCD gets a FREEZE message, the entire bus will unavoidably > go into a low-power suspend state. Should USB devices behave the same > way, suspending whenever they get a FREEZE? It doesn't seem necessary. > On the other hand, there's a question about when to enable remote wakeup. > I don't see anything wrong with leaving it enabled even when the device > isn't suspended -- but that's not how the code works now. At what point > during STR or STD (or even STANDBY) should remote wakeup be enabled? > (Note that this isn't an issue if we leave it enabled all the time.) I see your point... I think remote wakeups during freeze do not hurt anything. > Still unanswered is whether URBs should remain queued during FREEZE. > Obviously they won't get sent since the bus is suspended, but I don't see > anything wrong with allowing them to sit in the schedule. If usbcore > implements FREEZE by explicitly suspending devices then of course there > won't be any outstanding URBs. Leaving them in schedule is okay, as long as schedule is stored in main RAM (and not somewhere on the pci card). > This is related to the question of whether FREEZE is ever sent to a > partial subtree. What should happen if some USB devices get a FREEZE but > their parent HCD doesn't? Should never happen. Pavel -- People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!