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 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;
        }

For hub devices, the 'timeout' should be a bit long since khubd has been
frozen.

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