summaryrefslogtreecommitdiff
path: root/include/linux/overflow.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@linux-m68k.org>2024-08-07 06:36:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-04 17:29:49 +0300
commitccc87864b0978e1c96dff78377211cb10018fa3a (patch)
treeca2c75ecc79fa200951d3b2a315362731ce0ae0c /include/linux/overflow.h
parent0120c7762f259be8a8fbd5114a18cf13b3d93a9a (diff)
downloadlinux-ccc87864b0978e1c96dff78377211cb10018fa3a.tar.xz
scsi: mac_scsi: Disallow bus errors during PDMA send
commit 5551bc30e4a69ad86d0d008e2f56cd59b6583476 upstream. SD cards can produce write latency spikes on the order of a hundred milliseconds. If the target firmware does not hide that latency during DATA IN and OUT phases it can cause the PDMA circuitry to raise a processor bus fault which in turn leads to an unreliable byte count and a DMA overrun. The Last Byte Sent flag is used to detect the overrun but this mechanism is unreliable on some systems. Instead, set a DID_ERROR result whenever there is a bus fault during a PDMA send, unless the cause was a phase mismatch. Cc: stable@vger.kernel.org # 5.15+ Reported-and-tested-by: Stan Johnson <userm57@yahoo.com> Fixes: 7c1f3e3447a1 ("scsi: mac_scsi: Treat Last Byte Sent time-out as failure") Signed-off-by: Finn Thain <fthain@linux-m68k.org> Link: https://lore.kernel.org/r/cc38df687ace2c4ffc375a683b2502fc476b600d.1723001788.git.fthain@linux-m68k.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions