dwc2: gadget: Fix completed transfer size calculation in DDMA
authorMinas Harutyunyan <minas.harutyunyan@synopsys.com>
Fri, 22 Feb 2019 11:49:19 +0000 (15:49 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:43 +0000 (14:50 +0100)
commitac4217eebe4d824686514965a2f3780f8dfc0c0a
treea33a9510c72c3448112a307691c269c05fe92ffd
parent010b0e5100820c1c286ebe44cf0a5e2c57b6d67e
dwc2: gadget: Fix completed transfer size calculation in DDMA

[ 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