diff options
author | Finn Thain <[email protected]> | 2019-06-09 11:19:11 +1000 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2019-06-20 15:37:03 -0400 |
commit | 78ff751f8e6a9446e9fb26b2bff0b8d3f8974cbd (patch) | |
tree | 3c825327b03e7d19826334eab7e15687a0b6f53b /lib/mpi/mpi-internal.h | |
parent | 7398cee4c3e6aea1ba07a6449e5533ecd0b92cdd (diff) |
scsi: mac_scsi: Fix pseudo DMA implementation, take 2
A system bus error during a PDMA transfer can mess up the calculation of
the transfer residual (the PDMA handshaking hardware lacks a byte
counter). This results in data corruption.
The algorithm in this patch anticipates a bus error by starting each
transfer with a MOVE.B instruction. If a bus error is caught the transfer
will be retried. If a bus error is caught later in the transfer (for a
MOVE.W instruction) the transfer gets failed and subsequent requests for
that target will use PIO instead of PDMA.
This avoids the "!REQ and !ACK" error so the severity level of that message
is reduced to KERN_DEBUG.
Cc: Michael Schmitz <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: [email protected] # v4.14+
Fixes: 3a0f64bfa907 ("mac_scsi: Fix pseudo DMA implementation")
Signed-off-by: Finn Thain <[email protected]>
Reported-by: Chris Jones <[email protected]>
Tested-by: Stan Johnson <[email protected]>
Tested-by: Michael Schmitz <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions