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 Sat, Sep 22, 2012 at 11:48 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> 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 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