On Sat, 8 Jan 2005, Oliver Neukum wrote: > But I don't understand your line of reasoning. You are not taking > over from the BIOS. You are taking over from yourself as the kernel > has already initialised all devices once the image is read back.
It's a very tricky matter, and it depends on whether the HCD is built as a module or compiled into the kernel. Firstly, the BIOS is in control at the start of the resume, when you first turn the computer on. It may or may not assume ownership of the UHCI controllers at that time. Probably it won't if legacy support is disabled. Secondly, the startup kernel gets control of the machine. If the HCD is compiled in, then it will grab the HC and reset it. (I would like to know how to tell whether that step can be avoided. There's a further complication added by the relatively new code that does early-takeovers of host controllers. It's necessary for cases where the BIOS has enabled interrupts on the controller and the IRQ is shared with another device -- otherwise you can get unhandled interrupts when the IRQ has been enabled for the other device before the HCD has registered -- but it confuses things even more.) If the HCD was build as a module then it may not be loaded at all while the startup kernel is running. I forget the details of how this works; can the module be loaded from an initrd or equivalent before the image is restored? Thirdly the memory image is restored and the driver in the image is running again. Now it may have to take control of the HC from the BIOS, from nobody (but after the HC may or may not have been reset), from its duplicate in the startup kernel, or from its own former incarnation. And it's not so easy to tell which has happened! Fortunately, all it really needs to do is another BIOS takeover (if needed) and decide whether a reset is required (that's the hard part). Certainly the current code in the driver doesn't do this correctly. In fact, it pretty much ignores the whole issue. Still, I would expect it to work in your computer. Alan Stern ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel