1
0
Fork 0
alistair23-linux/drivers/dma/sh
Yoshihiro Shimoda 684a5568df dmaengine: sh: usb-dmac: set tx_result parameters
[ Upstream commit 466257d996 ]

A client driver (renesas_usbhs) assumed that
dmaengine_tx_status() could return the residue even if
the transfer was completed. However, this was not correct
usage [1] and this caused to break getting the residue after
the commit 24461d9792 ("dmaengine: virt-dma: Fix access after
free in vchan_complete()") actually. So, this is possible to get
wrong received size if the usb controller gets a short packet.
For example, g_zero driver causes "bad OUT byte" errors.

To use the tx_result from the renesas_usbhs driver when
the transfer is completed, set the tx_result parameters.

Notes that the renesas_usbhs driver needs to update for it.

[1]
https://lore.kernel.org/dmaengine/20200616165550.GP2324254@vkoul-mobl/

Reported-by: Hien Dang <hien.dang.eb@renesas.com>
Fixes: 24461d9792 ("dmaengine: virt-dma: Fix access after free in vchan_complete()")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1592482053-19433-1-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-22 09:33:00 +02:00
..
Kconfig dmaengine: sudmac: remove unused driver 2019-05-21 09:52:50 +05:30
Makefile dmaengine: sudmac: remove unused driver 2019-05-21 09:52:50 +05:30
rcar-dmac.c dmaengine updates for v5.4-rc1 2019-09-17 19:04:40 -07:00
shdma-arm.h dmaengine: use SPDX identifier for Renesas drivers 2018-08-29 21:58:49 +05:30
shdma-base.c dmaengine: use SPDX identifier for Renesas drivers 2018-08-29 21:58:49 +05:30
shdma-of.c dmaengine: use SPDX identifier for Renesas drivers 2018-08-29 21:58:49 +05:30
shdma.h dmaengine: sh: Remove R-Mobile APE6 support 2018-12-05 13:01:54 +05:30
shdmac.c dmaengine: sh: Remove R-Mobile APE6 support 2018-12-05 13:01:54 +05:30
usb-dmac.c dmaengine: sh: usb-dmac: set tx_result parameters 2020-07-22 09:33:00 +02:00