Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289636
b: refs/heads/master
c: aee63e3
h: refs/heads/master
v: v3
  • Loading branch information
Paul Zimmerman authored and Felipe Balbi committed Mar 2, 2012
1 parent 5ad9864 commit f17c04b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d26b58735f5badf2b7ce3320c6ba21b603c77a9
refs/heads/master: aee63e3cb6b0396b99c6387a47cb90a7417f3957
7 changes: 3 additions & 4 deletions trunk/drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode)
* @state: the state to put link into
*
* Caller should take care of locking. This function will
* return 0 on success or -EINVAL.
* return 0 on success or -ETIMEDOUT.
*/
int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state)
{
int retries = 100;
int retries = 10000;
u32 reg;

reg = dwc3_readl(dwc->regs, DWC3_DCTL);
Expand All @@ -113,11 +113,10 @@ int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state)
while (--retries) {
reg = dwc3_readl(dwc->regs, DWC3_DSTS);

/* in HS, means ON */
if (DWC3_DSTS_USBLNKST(reg) == state)
return 0;

udelay(500);
udelay(5);
}

dev_vdbg(dwc->dev, "link state change request timed out\n");
Expand Down

0 comments on commit f17c04b

Please sign in to comment.