Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259217
b: refs/heads/master
c: 08e6c61
h: refs/heads/master
i:
  259215: c69d8bc
v: v3
  • Loading branch information
Kuninori Morimoto authored and Greg Kroah-Hartman committed Jun 14, 2011
1 parent d50584d commit 5cb3fac
Show file tree
Hide file tree
Showing 4 changed files with 13 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: dcc854579059ff9633db4dc41c681371d22f794e
refs/heads/master: 08e6c611123ab499757e4133df7ddc0875c0dccf
5 changes: 4 additions & 1 deletion trunk/drivers/usb/renesas_usbhs/mod_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,11 @@ static int usbhsg_ep_enable(struct usb_ep *ep,
* if it already have pipe,
* nothing to do
*/
if (uep->pipe)
if (uep->pipe) {
usbhs_pipe_clear(uep->pipe);
usbhs_pipe_clear_sequence(uep->pipe);
return 0;
}

pipe = usbhs_pipe_malloc(priv, desc);
if (pipe) {
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/usb/renesas_usbhs/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,12 @@ void usbhs_pipe_clear_sequence(struct usbhs_pipe *pipe)
usbhsp_pipectrl_set(pipe, SQCLR, SQCLR);
}

void usbhs_pipe_clear(struct usbhs_pipe *pipe)
{
usbhsp_pipectrl_set(pipe, ACLRM, ACLRM);
usbhsp_pipectrl_set(pipe, ACLRM, 0);
}

static struct usbhs_pipe *usbhsp_get_pipe(struct usbhs_priv *priv, u32 type)
{
struct usbhs_pipe *pos, *pipe;
Expand Down Expand Up @@ -568,8 +574,7 @@ void usbhs_pipe_init(struct usbhs_priv *priv,
INIT_LIST_HEAD(&pipe->list);

/* pipe force init */
usbhsp_pipectrl_set(pipe, ACLRM, ACLRM);
usbhsp_pipectrl_set(pipe, ACLRM, 0);
usbhs_pipe_clear(pipe);
}

info->done = done;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/renesas_usbhs/pipe.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void usbhs_pipe_init(struct usbhs_priv *priv,
int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map));
int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe);
void usbhs_pipe_clear_sequence(struct usbhs_pipe *pipe);
void usbhs_pipe_clear(struct usbhs_pipe *pipe);
int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe);
void usbhs_pipe_enable(struct usbhs_pipe *pipe);
void usbhs_pipe_disable(struct usbhs_pipe *pipe);
Expand Down

0 comments on commit 5cb3fac

Please sign in to comment.