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, 25 Sep 2012, Ming Lei wrote:

> 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?

Do we really need to?  Remember, you are adding this new code only
because some Genesys Logic hubs are buggy.  Is there any reason to 
think other devices will have similar bugs?

As long as the device issues a remote wakeup request at the proper time
(i.e., whenever it is suspended with wakeup enabled and an event needs
to be processed), this workaround isn't needed.

Alan Stern

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