Re: [PATCH v7 12/16] usb: synchronize port poweroff and khubd

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

 



On Mon, Apr 28, 2014 at 11:25 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 25 Apr 2014, Dan Williams wrote:
>
>> >> @@ -4892,11 +4897,17 @@ static void hub_events(void)
>> >>
>> >>               /* deal with port status changes */
>> >>               for (i = 1; i <= hdev->maxchild; i++) {
>> >> +                     struct usb_port *port_dev = hub->ports[i - 1];
>> >> +
>> >>                       if (!test_bit(i, hub->busy_bits)
>> >>                                       && (test_and_clear_bit(i, hub->event_bits)
>> >>                                               || test_bit(i, hub->change_bits)
>> >> -                                             || test_bit(i, hub->wakeup_bits)))
>> >> +                                             || test_bit(i, hub->wakeup_bits))) {
>> >
>> > Please add a comment here, explaining that this is to prevent any
>> > runtime suspends from powering-off the port while we're handling the
>> > events.
>> >
>>
>> Added:
>>                                 /*
>>                                  * The get_noresume and barrier ensures that if
>
> s/ensures/ensure/
>
>>                                  * the port was in the process of resuming we
>
> s/resuming/resuming,/
>
>>                                  * flush that work and keep the port active for
>>                                  * the duration of the port_event().  However,
>>                                  * if the port is runtime pm suspended
>>                                  * (powered-off), we leave it in that state, run
>>                                  * an abbreviated port_event(), and move on.
>>                                  */
>
> Otherwise fine.
>

Noted, thanks.
--
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