]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
usb: dwc2: gadget: Fix issue in dwc2_gadget_start_isoc()
authorMinas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Tue, 12 Jun 2018 08:37:29 +0000 (12:37 +0400)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:42:30 +0000 (19:42 -0600)
BugLink: https://bugs.launchpad.net/bugs/1835845
[ Upstream commit 1ffba9058737af2ddeebc813faa8ea9b16bc892a ]

In case of requests queue is empty reset EP target_frame to
initial value.

This allow restarting ISOC traffic in case when function
driver queued requests with interruptions.

Tested-by: Zeng Tao <prime.zeng@hisilicon.com>
Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/dwc2/gadget.c

index 336a6f365ab58b0442cdaff47be7d8decd3c5dde..048fe9ba63860dd8992f699332c510fa616b8b73 100644 (file)
@@ -891,6 +891,7 @@ static void dwc2_gadget_start_isoc_ddma(struct dwc2_hsotg_ep *hs_ep)
        u32 ctrl;
 
        if (list_empty(&hs_ep->queue)) {
+               hs_ep->target_frame = TARGET_FRAME_INITIAL;
                dev_dbg(hsotg->dev, "%s: No requests in queue\n", __func__);
                return;
        }