On Fri, 30 Dec 2005, David Brownell wrote: > > OK, let's assume I have suspended a mouse device. If I move it, it > > wakes up the hcd. The hcd got an interrupt and in the interrupt > > handler I only raise the C_PORT_SUSPEND field in the port status > > change bits. Khubd notices this change and only asks for the root hub > > to clear the C_PORT_SUSPEND bit. Should I resume the bus when clearing > > this bit ? > > It's physically impossible to have the bus suspended while some > port on it is active. I think that answers your question. ;)
The question was phrased a little vaguely. If the mouse device is suspended and the bus is active, then khubd will see the C_PORT_SUSPEND flag and will call remote_wakeup() to finish resuming the mouse. It doesn't just clear the flag. On the other hand, suppose the mouse and the bus are both suspended. When you move the mouse the HCD will get an interrupt and see that a remote wakeup request was received. Then the HCD should call usb_hcd_resume_root_hub() to tell khubd to re-activate the bus. Once that's done, khubd will see the C_PORT_SUSPEND bit and proceed as described above. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
