diff mbox

[10/11] usb: dwc3: gadget: make sure HIRD threshold is 0 in superspeed

Message ID 1393357243-2958-11-git-send-email-balbi@ti.com
State Accepted
Commit 356363bf6b2fc4785d874ef87ed2fad4b8543490
Headers show

Commit Message

Felipe Balbi Feb. 25, 2014, 7:40 p.m. UTC
During superspeed, HIRD threshold should always
be zero. Curent driver wasn't making sure that
was the case.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/usb/dwc3/gadget.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 3eee96a..d307ad7 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2331,6 +2331,10 @@  static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
 		reg |= DWC3_DCTL_HIRD_THRES(12);
 
 		dwc3_writel(dwc->regs, DWC3_DCTL, reg);
+	} else {
+		reg = dwc3_readl(dwc->regs, DWC3_DCTL);
+		reg &= ~DWC3_DCTL_HIRD_THRES_MASK;
+		dwc3_writel(dwc->regs, DWC3_DCTL, reg);
 	}
 
 	dep = dwc->eps[0];