]> git.baikalelectronics.ru Git - kernel.git/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>
Wed, 17 May 2023 09:53:26 +0000 (11:53 +0200)
commit230ca8626c28cbabda480ec4a821a13d3a6719ca
tree98afb19734c52644927986124299730c8715eda5
parentbd8ea0e8ef2d6ee0762694d5c438ac0dd6388ece
usb: dwc3: gadget: Execute gadget stop after halting the controller

[ Upstream commit 39674be56fba1cd3a03bf4617f523a35f85fd2c1 ]

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: 62cef69baccd ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc3/gadget.c