2005/12/30, Alan Stern <[EMAIL PROTECTED]>:
> 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.
>

yeah, sorry for that it was just before starting the last weekend of the year

> 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.
>

ok, but where is the hcd supposed to wake up the device here ? I don't
think it's done when getting the remote wakeup interrupt because we
should wait for the device to release the bus...then khubd will see
the C_PORT_SUSPEND flag and clear it. The device is still suspended.
Eventually khubd will call remote_wakeup, which will do a
usb_get_status. This last call will fail since the device is not
resumed...

> 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.
>

Let say that my hcd has only one port. In both cases you described,
can the hcd call usb_hcd_resume_root_hub() and raise C_PORT_SUSPEND
flag when getting the remote wakeup interrupt ?

Thanks
--
               Franck


-------------------------------------------------------
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_idv37&alloc_id865&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to