Re: [PATCH v2 1/2] USB: reset-resume the device when PORT_SUSPEND is set but timeout

From: Alan Stern
Date: Thu May 13 2021 - 10:41:48 EST


On Thu, May 13, 2021 at 12:21:52PM +0800, Chris Chiu wrote:
> On Wed, May 12, 2021 at 11:04 PM Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > For testing purposes, set status to 0 and jump to a new goto label in
> > the "else" branch. In other words, treat it as if the suspend really
> > had worked and go back to the successful pathway. Try this out and see
> > if it fixes the problem.
> >
> > If it does then the reset-resume isn't needed. If it doesn't, post your
> > patch again, and mention in the patch description that testing shows the
> > reset-resume really is necessary.
> >
> > Alan Stern
>
> Thanks for the suggestion. I revised the patch to create a new goto
> label in the "else" branch and clear the status to zero if the port is
> really suspended. It fixed the problem in my 100 time suspend/resume
> test. I will send v3 patch w/ the modification.

Great! This is a much better solution.

Alan Stern