lkml.org 
[lkml]   [2020]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 341/639] dwc2: gadget: Fix completed transfer size calculation in DDMA
    Date
    From: Minas Harutyunyan <minas.harutyunyan@synopsys.com>

    [ Upstream commit 5acb4b970184d189d901192d075997c933b82260 ]

    Fix calculation of transfer size on completion in function
    dwc2_gadget_get_xfersize_ddma().

    Added increment of descriptor pointer to move to next descriptor in
    the loop.

    Fixes: aa3e8bc81311 ("usb: dwc2: gadget: DDMA transfer start and complete")

    Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
    Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/usb/dwc2/gadget.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
    index 3f68edde0f03a..f64d1cd08fb67 100644
    --- a/drivers/usb/dwc2/gadget.c
    +++ b/drivers/usb/dwc2/gadget.c
    @@ -2230,6 +2230,7 @@ static unsigned int dwc2_gadget_get_xfersize_ddma(struct dwc2_hsotg_ep *hs_ep)
    if (status & DEV_DMA_STS_MASK)
    dev_err(hsotg->dev, "descriptor %d closed with %x\n",
    i, status & DEV_DMA_STS_MASK);
    + desc++;
    }

    return bytes_rem;
    --
    2.20.1


    \
     
     \ /
      Last update: 2020-01-24 12:20    [W:2.147 / U:1.532 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site