summaryrefslogtreecommitdiffstats
path: root/crypto/lz4hc.c
diff options
context:
space:
mode:
authorFinn Thain2019-06-09 03:19:11 +0200
committerGreg Kroah-Hartman2019-07-26 09:14:19 +0200
commitce7ec07abaf7d66eaaa5fca9cb5a15db3f8974f9 (patch)
treee62c1635e1a3d13d7e1278ed1cf8fca4d75c0618 /crypto/lz4hc.c
parentscsi: mac_scsi: Increase PIO/PDMA transfer length threshold (diff)
downloadkernel-qcow2-linux-ce7ec07abaf7d66eaaa5fca9cb5a15db3f8974f9.tar.gz
kernel-qcow2-linux-ce7ec07abaf7d66eaaa5fca9cb5a15db3f8974f9.tar.xz
kernel-qcow2-linux-ce7ec07abaf7d66eaaa5fca9cb5a15db3f8974f9.zip
scsi: mac_scsi: Fix pseudo DMA implementation, take 2
commit 78ff751f8e6a9446e9fb26b2bff0b8d3f8974cbd upstream. 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 <schmitzmic@gmail.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: stable@vger.kernel.org # v4.14+ Fixes: 3a0f64bfa907 ("mac_scsi: Fix pseudo DMA implementation") Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reported-by: Chris Jones <chris@martin-jones.com> Tested-by: Stan Johnson <userm57@yahoo.com> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/lz4hc.c')
0 files changed, 0 insertions, 0 deletions