diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2020-06-18 21:07:33 +0900 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-06-24 11:34:53 +0530 |
commit | 466257d9968ac79575831250b039dc07566c7b13 (patch) | |
tree | 6f51a4636cb2732200bc62c46f1fe0f43e755e16 /.clang-format | |
parent | d964d5ff68dba21b53368656adec3fb5f50426bb (diff) |
dmaengine: sh: usb-dmac: set tx_result parameters
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 24461d9792c2 ("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: 24461d9792c2 ("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>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions