diff options
author | Minas Harutyunyan <minas.harutyunyan@synopsys.com> | 2019-02-22 12:49:19 +0100 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-05-03 08:13:49 +0200 |
commit | 5acb4b970184d189d901192d075997c933b82260 (patch) | |
tree | 4b01dbf474b02c4de6ac9d78b3d67a483a906bbe /drivers/usb/dwc2/gadget.c | |
parent | usb: dwc2: Set lpm mode parameters depend on HW configuration (diff) | |
download | linux-5acb4b970184d189d901192d075997c933b82260.tar.xz linux-5acb4b970184d189d901192d075997c933b82260.zip |
dwc2: gadget: Fix completed transfer size calculation in DDMA
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>
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index a17e444e467b..16ffd9fd9361 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2325,6 +2325,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; |