Re: Patch "usb: dwc3: qcom: fix peripheral and OTG suspend" has been added to the 5.19-stable tree

From: Johan Hovold
Date: Sat Sep 24 2022 - 04:56:50 EST


FFS, Sasha...

On Fri, Sep 23, 2022 at 12:55:34PM -0400, Sasha Levin wrote:
> This is a note to let you know that I've just added the patch titled
>
> usb: dwc3: qcom: fix peripheral and OTG suspend
>
> to the 5.19-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
> usb-dwc3-qcom-fix-peripheral-and-otg-suspend.patch
> and it can be found in the queue-5.19 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@xxxxxxxxxxxxxxx> know about it.

Stop pulling in these dwc3 patches! I already spent an afternoon doing
backports for all the stable trees so that you wouldn't pull in half the
world as dependencies.

This fixes an issue with a commit in 6.0, which should not be backported
in the first place.

Just as I told you two weeks ago when these were dropped the last time:

https://lore.kernel.org/lkml/YxbfJqPb8x0WjmqR@xxxxxxxxxxxxxxxxxxxx/

If you can't fix up the trivial context change yourself, then use one of
the backports of:

https://lore.kernel.org/lkml/20220906120702.19219-3-johan@xxxxxxxxxx/

or simply just leave it out as the issue can't be triggered in 5.19
currently.

Just drop all the dwc3 patches from the pending-5.19 branch.

> commit a989a972abf4ae3f79bbff2d9dc9956eda25e2f0
> Author: Johan Hovold <johan+linaro@xxxxxxxxxx>
> Date: Thu Aug 4 17:09:58 2022 +0200
>
> usb: dwc3: qcom: fix peripheral and OTG suspend
>
> [ Upstream commit c5f14abeb52b0177b940fd734133d383da3521d8 ]
>
> A recent commit implementing wakeup support in host mode instead broke
> suspend for peripheral and OTG mode.
>
> The hack that was added in the suspend path to determine the speed of
> any device connected to the USB2 bus not only accesses internal driver
> data for a child device, but also dereferences a NULL pointer or
> accesses freed data when the controller is not acting as host.
>
> There's no quick fix to the layering violation, but since reverting
> would leave us with broken suspend in host mode with wakeup triggering
> immediately, let's keep the hack for now.
>
> Fix the immediate issues by only checking the host bus speed and
> enabling wakeup interrupts when acting as host.
>
> Fixes: 6895ea55c385 ("usb: dwc3: qcom: Configure wakeup interrupts during suspend")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/20220804151001.23612-7-johan+linaro@xxxxxxxxxx
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

Johan