diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2018-10-16 16:31:25 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-13 11:14:56 -0800 |
commit | 94dc21c6a549aa67c8403142496c1531b91ded33 (patch) | |
tree | 8ec6ad449b0f39f8bf3a5f929a5555ae7fa09eb1 /include/uapi | |
parent | 09d43edcdaef8961f01ae499b836e3cb39e47f83 (diff) | |
download | linux-exynos-94dc21c6a549aa67c8403142496c1531b91ded33.tar.gz linux-exynos-94dc21c6a549aa67c8403142496c1531b91ded33.tar.bz2 linux-exynos-94dc21c6a549aa67c8403142496c1531b91ded33.zip |
scsi: esp_scsi: Track residual for PIO transfers
[ Upstream commit fd47d919d0c336e7c22862b51ee94927ffea227a ]
If a target disconnects during a PIO data transfer the command may fail
when the target reconnects:
scsi host1: DMA length is zero!
scsi host1: cur adr[04380000] len[00000000]
The scsi bus is then reset. This happens because the residual reached
zero before the transfer was completed.
The usual residual calculation relies on the Transfer Count registers.
That works for DMA transfers but not for PIO transfers. Fix the problem
by storing the PIO transfer residual and using that to correctly
calculate bytes_sent.
Fixes: 6fe07aaffbf0 ("[SCSI] m68k: new mac_esp scsi driver")
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions