Skip to content

Commit

Permalink
usb: renesas_usbhs: call usbhsg_queue_pop() when pipe disable.
Browse files Browse the repository at this point in the history
When poping packet from queue, it needs correct end procedure.
This patch call usbhsg_queue_pop() in usbhsg_pipe_disable().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Kuninori Morimoto authored and Felipe Balbi committed Dec 12, 2011
1 parent 25fa707 commit 91b158f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/usb/renesas_usbhs/mod_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,16 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
struct usbhs_pkt *pkt;

usbhs_pipe_disable(pipe);

while (1) {
pkt = usbhs_pkt_pop(pipe, NULL);
if (!pkt)
break;

usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ECONNRESET);
}

usbhs_pipe_disable(pipe);

return 0;
}

Expand Down

0 comments on commit 91b158f

Please sign in to comment.