aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r--drivers/usb/renesas_usbhs/mod_gadget.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index 16484060a24c..dba15e07fbd2 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -557,14 +557,16 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep)
557 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); 557 struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
558 struct usbhs_pkt *pkt; 558 struct usbhs_pkt *pkt;
559 559
560 usbhs_pipe_disable(pipe);
561
562 while (1) { 560 while (1) {
563 pkt = usbhs_pkt_pop(pipe, NULL); 561 pkt = usbhs_pkt_pop(pipe, NULL);
564 if (!pkt) 562 if (!pkt)
565 break; 563 break;
564
565 usbhsg_queue_pop(uep, usbhsg_pkt_to_ureq(pkt), -ECONNRESET);
566 } 566 }
567 567
568 usbhs_pipe_disable(pipe);
569
568 return 0; 570 return 0;
569} 571}
570 572