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 Tue, Sep 25, 2012 at 12:42 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 24 Sep 2012, Ming Lei wrote:
>
>> On Mon, Sep 24, 2012 at 12:09 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> 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.

If so, almost all drivers for usb devices with remote wakeup capability need
this change, could we figure out one way to handle it centralizedly?

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