]> Git Repo - linux.git/commit
spi: dw: use "smp_mb()" to avoid sending spi data error
authorXinwei Kong <[email protected]>
Fri, 3 Jan 2020 02:52:10 +0000 (10:52 +0800)
committerMark Brown <[email protected]>
Mon, 6 Jan 2020 20:49:03 +0000 (20:49 +0000)
commitbfda044533b213985bc62bd7ca96f2b984d21b80
tree9ac27f2aec9f611e097d5d3b9d42b546a2f558a5
parent09b6636cea4f8e419d7cca4155e8695e462535a6
spi: dw: use "smp_mb()" to avoid sending spi data error

Because of out-of-order execution about some CPU architecture,
In this debug stage we find Completing spi interrupt enable ->
prodrucing TXEI interrupt -> running "interrupt_transfer" function
will prior to set "dw->rx and dws->rx_end" data, so this patch add
memory barrier to enable dw->rx and dw->rx_end to be visible and
solve to send SPI data error.
eg:
it will fix to this following low possibility error in testing environment
which using SPI control to connect TPM Modules

kernel: tpm tpm0: Operation Timed out
kernel: tpm tpm0: tpm_relinquish_locality: : error -1

Signed-off-by: fengsheng <[email protected]>
Signed-off-by: Xinwei Kong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
drivers/spi/spi-dw.c
This page took 0.051832 seconds and 4 git commands to generate.