On Mon, 24 Sep 2012, Ming Lei wrote:

> On Mon, Sep 24, 2012 at 12:09 AM, Alan Stern <st...@rowland.harvard.edu> 
> wrote:
> 
> > No, you can still handle the other case.  You need to report the
> > condition to the PM core, say by calling pm_wakeup_event().
> 
> Good point, so kind of below code should be added to usb_suspend_both
> to handle the situation centralizedly:
> 
>         if (!PMSG_IS_AUTO(msg)) {
>                      if (hdev->do_remote_wakeup && status == -EBUSY)
>                               pm_wakeup_event(&hdev->dev, timeout)
>                      status = 0;
>         }

No.  Drivers can return -EBUSY for other reasons besides a pending 
wakeup.  They will have to handle wakeups by themselves.

> For hub devices, the 'timeout' should be a bit long since khubd has been
> frozen.

Yeah, probably around a second or two.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to