On Wednesday 20 September 2006 10:09 am, Alan Stern wrote: > Dave: > > I want to modify the bus_suspend and bus_resume routines in ohci-hub.c. > The idea is to have versions that can operate entirely in interrupt > context. > > Normally of course this would be impossible. But if you know that no > ports are enabled (or even connected) and none have been for the last > second or so, then it should be possible to move directly between the > OPER and SUSPEND states with no delays.
If all enabled ports are suspended, it's also OK; and "the last second or so" is not a necessary constraint. > Will this work? Certainly. That's *exactly* how that routine works today -- when it's called from ohci_hub_status_data(), after it's established that it can be done atomically! Of course it also autosuspends when all the enabled ports are already suspended, understands about cases where the root hub shouldn't autosuspend, etc. > Is it more or less obvious which portions of the suspend > and resume routines can be skipped under these circumstances? Will any of > the known controller quirks pose a problem? > > In short, can you offer any advice about the best way to do it? Just use the existing code, after having made sure all the various preconditions are met! - Dave ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel