Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248749
b: refs/heads/master
c: 409ba9e
h: refs/heads/master
i:
  248747: fbc08c0
v: v3
  • Loading branch information
Kuninori Morimoto authored and Greg Kroah-Hartman committed Apr 30, 2011
1 parent 1ab650a commit 7174a58
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 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: 45e13e6e0aa954af2d4779a07262f4c12d6f032f
refs/heads/master: 409ba9e7c023bdbfd2ecab960532523124de5c81
20 changes: 17 additions & 3 deletions trunk/drivers/usb/renesas_usbhs/mod_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,12 +787,18 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
usbhsg_queue_pop(uep, ureq, -ECONNRESET);
}

uep->pipe->mod_private = NULL;
uep->pipe = NULL;

return 0;
}

static void usbhsg_uep_init(struct usbhsg_gpriv *gpriv)
{
int i;
struct usbhsg_uep *uep;

usbhsg_for_each_uep_with_dcp(uep, gpriv, i)
uep->pipe = NULL;
}

/*
*
* usb_ep_ops
Expand All @@ -809,6 +815,13 @@ static int usbhsg_ep_enable(struct usb_ep *ep,
unsigned long flags;
int ret = -EIO;

/*
* if it already have pipe,
* nothing to do
*/
if (uep->pipe)
return 0;

/******************** spin lock ********************/
spin_lock_irqsave(lock, flags);

Expand Down Expand Up @@ -1045,6 +1058,7 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
* pipe initialize and enable DCP
*/
usbhs_pipe_init(priv);
usbhsg_uep_init(gpriv);
usbhsg_dcp_enable(dcp);

/*
Expand Down

0 comments on commit 7174a58

Please sign in to comment.