[PATCH] spi: atmel: fix corruption caused by too early transfer completion
Ronald Wahl
ronald.wahl at raritan.com
Wed Aug 6 16:33:04 PDT 2014
On 2014-08-06 13:00, Ronald Wahl wrote:
> The PDC (peripheral DMA controller) on AT91 supports two transfer
> counters and associated registers - one for current and one for the
> next transfer. If the current transfer is done the next transfer is
> moved into the current transfer. Now there are two interrupts: one is
> raised whenever a single transfer is done (ENDRX) and the other one is
> raised when the current and the next transfer has finished (RXBUFF).
> The issue is that the driver only enables the ENDRX interrupt which may
> lead to queuing a new request while there is still a transfer running.
> This can lead to overruns and/or corruption. By using the RXBUFF
> interrupt only we queue new requests only when the hardware queue is
> empty avoiding this problem.
Forgot to Cc: Nicolas Ferre ...
- ron
More information about the linux-arm-kernel
mailing list