]> git.hungrycats.org Git - linux/commit
usb: dwc3: gadget: Execute gadget stop after halting the controller
authorWesley Cheng <quic_wcheng@quicinc.com>
Thu, 20 Apr 2023 21:27:58 +0000 (14:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 07:55:16 +0000 (08:55 +0100)
commit9ae312f7f3c23ee218d9b014f06f439a2295e352
tree21bad1f85fbbe9d11460892f5ca15865b8d3404f
parent921acacb92b71d52e359d42f175b1ad0c7a2b892
usb: dwc3: gadget: Execute gadget stop after halting the controller

commit 39674be56fba1cd3a03bf4617f523a35f85fd2c1 upstream.

Do not call gadget stop until the poll for controller halt is
completed.  DEVTEN is cleared as part of gadget stop, so the intention to
allow ep0 events to continue while waiting for controller halt is not
happening.

Fixes: c96683798e27 ("usb: dwc3: ep0: Don't prepare beyond Setup stage")
Cc: stable@vger.kernel.org
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20230420212759.29429-2-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c