Commit 50332374 authored by Jorge Ramirez-Ortiz's avatar Jorge Ramirez-Ortiz Committed by Zhihong Yu
Browse files

FROMLIST: spi: qup: fix PIO/DMA transfers.

- DMA/PIO:
  If an error IRQ occurred during PIO or DMA mode make sure to log it so
on completion the transfer can be marked as an error.

- PIO:
  Do not complete a transaction until all data has been transferred or
an error IRQ was flagged.

1) If there was no error IRQ, ignore the done flag IRQ
(QUP_OP_MAX_INPUT_DONE_FLAG) until all data for the transfer has been
processed: not doing so risks completing the transfer returning
uninitialized data in the buffers.

2) Under stress testing we have identified the need to
protect read/write operations against spurious IN/OUT service events.

BUG=b:134098398
TEST=Access TPM in loop

(am from https://lore.kernel.org/patchwork/patch/1086429/

)

Change-Id: I46a65d1bf38445fa4bd7706b2bb8203ce774fec9
Signed-off-by: default avatarJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: default avatarVamsi Singamsetty <vamssi@codeaurora.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1654785


Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Reviewed-by: default avatarYuji Sasaki <sasakiy@chromium.org>
Reviewed-by: default avatarZhihong Yu <zhihongyu@chromium.org>
Tested-by: default avatarZhihong Yu <zhihongyu@chromium.org>
parent 7b9d71ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment