Re: [PATCH v1 1/2] USB: check port changes before hub runtime suspend for some bug device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 23 Sep 2012, Ming Lei wrote:

> >> @@ -3192,6 +3214,15 @@ static int hub_suspend(struct usb_interface *intf, pm_message_t msg)
> >>
> >>       /* stop khubd and related activity */
> >>       hub_quiesce(hub, HUB_SUSPEND);
> >> +
> >> +     if (PMSG_IS_AUTO(msg) && hub->quirk_check_port_auto_suspend) {
> >
> > The correct condition is hdev->do_remote_wakeup != 0, not PMSG_IS_AUTO.
> 
> Yes, but the returned failure will be ignored for non-PMSG_IS_AUTO
> cases,

That's true...

>  so it is better to just check ports for auto suspend situation.

No, you can still handle the other case.  You need to report the
condition to the PM core, say by calling pm_wakeup_event().

-----------------------

Actually, this whole discussion brings up a related issue.  This is 
a problem I came across recently.  It deserves its own email thread, so 
I will post it in a separate follow-up message.

Alan Stern

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux