]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: dwc2: gadget: fix packet drop issue in dwc2_gadget_handle_nak
authorZeng Tao <prime.zeng@hisilicon.com>
Tue, 12 Jun 2018 14:49:06 +0000 (22:49 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 18 Jun 2018 09:41:01 +0000 (12:41 +0300)
In ISOC transfer, when the NAK interrupt happens, we shouldn't complete
a usb request, the current flow will complete one usb request with no
hardware transfer, this will lead to a packet drop on the usb bus.

Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c

index bb499fea610086d17314388c4c80aa1611a2e121..bb5eb3c8132df97ba1033a7097db2fc8c7e47fa6 100644 (file)
@@ -2818,9 +2818,6 @@ static void dwc2_gadget_handle_nak(struct dwc2_hsotg_ep *hs_ep)
 
                tmp = dwc2_hsotg_read_frameno(hsotg);
                if (using_desc_dma(hsotg)) {
-                       dwc2_hsotg_complete_request(hsotg, hs_ep,
-                                                   get_ep_head(hs_ep), 0);
-
                        hs_ep->target_frame = tmp;
                        dwc2_gadget_incr_frame_num(hs_ep);
                        dwc2_gadget_start_isoc_ddma(hs_ep);