diff options
author | Mian Yousaf Kaukab <yousaf.kaukab@intel.com> | 2015-09-29 06:08:22 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-10-01 13:40:25 -0400 |
commit | b2d4c54e51c4213d215520bab25efee74ddc8d3a (patch) | |
tree | ae479761282a3814dcb94637a869b1653622d4bc | |
parent | 86de48953653777fd6f918f5c0f2107bb873eae3 (diff) |
usb: dwc2: gadget: ignore stall check for ep0
dwc2_hsotg_start_req starts a request only if endpoint is not stalled.
Ignore this check for ep0 as core will clear DOEPCTL0.Stall after
sending stall handshake. Prepare instead for receiving next setup
packet.
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Tested-by: Robert Baldyga <r.baldyga@samsung.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Tested-by: John Youn <johnyoun@synopsys.com>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index af4f0c165d05..885b5b663a69 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c | |||
@@ -556,7 +556,7 @@ static void dwc2_hsotg_start_req(struct dwc2_hsotg *hsotg, | |||
556 | /* If endpoint is stalled, we will restart request later */ | 556 | /* If endpoint is stalled, we will restart request later */ |
557 | ctrl = dwc2_readl(hsotg->regs + epctrl_reg); | 557 | ctrl = dwc2_readl(hsotg->regs + epctrl_reg); |
558 | 558 | ||
559 | if (ctrl & DXEPCTL_STALL) { | 559 | if (index && ctrl & DXEPCTL_STALL) { |
560 | dev_warn(hsotg->dev, "%s: ep%d is stalled\n", __func__, index); | 560 | dev_warn(hsotg->dev, "%s: ep%d is stalled\n", __func__, index); |
561 | return; | 561 | return; |
562 | } | 562 | } |