UPSTREAM: usb: dwc3: gadget: Return -ESHUTDOWN on ep disable

The usb_request API clearly noted that removed requests due to disabled
endpoint should have -ESHUTDOWN status returned. Don't change this
behavior.

Fixes: b44c0e7fef51 ("usb: dwc3: gadget: conditionally remove requests")
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/3421859485cb32d77e2068549679a6c07a7797bc.1667875427.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ffb9da4a04c69567bad717707b6fdfbc4c216ef4)

Bug: 290141348
Change-Id: I92e7910e3957fb7e77bf6a1b1c121ce143f1c1c6
Signed-off-by: Udipto Goswami <quic_ugoswami@quicinc.com>
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
This commit is contained in:
Thinh Nguyen
2022-11-07 18:45:44 -08:00
committed by Todd Kjos
parent 70c18ca7e0
commit 3e28748194

View File

@@ -1042,7 +1042,7 @@ static int __dwc3_gadget_ep_disable(struct dwc3_ep *dep)
reg &= ~DWC3_DALEPENA_EP(dep->number);
dwc3_writel(dwc->regs, DWC3_DALEPENA, reg);
dwc3_remove_requests(dwc, dep, -ECONNRESET);
dwc3_remove_requests(dwc, dep, -ESHUTDOWN);
dep->stream_capable = false;
dep->type = 0;