On Sat, Sep 22, 2012 at 11:48 PM, Alan Stern <st...@rowland.harvard.edu> wrote:
>
> This is basically okay.  I have a couple of suggestions.

Thanks for your suggestion.

>
>> @@ -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, so it is better to just check ports for auto suspend situation.

>
>> +             /* check if there are changes pending on hub ports */
>> +             if (check_ports_changed(hub)) {
>> +                     hub_activate(hub, HUB_RESUME);
>> +                     return -EBUSY;
>> +             }
>> +     }
>
> If the new code is moved up before the hub_quiesce() call then you
> won't need to call hub_activate().

Looks fine, will do it.

Thanks,
--
Ming Lei
--
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