Re: [PATCH] spi/pxa2xx: Prevent DMA from transferring too many bytes
From: Mika Westerberg
Date: Fri May 09 2014 - 07:21:15 EST
On Fri, May 09, 2014 at 11:33:15AM +0100, Mark Brown wrote:
> On Thu, May 08, 2014 at 05:30:31PM +0300, Mika Westerberg wrote:
> > In case we are doing DMA transfer and the size of the buffer is not multiple
> > of 4 bytes the driver truncates that to 4-byte boundary and tries to handle
> > remaining bytes using PIO.
>
> ...
>
> > While investigating this it turned out that the DMA hardware doesn't even
> > have such limitation so we can solve this by dropping the code that tries
> > to handle unaligned bytes.
>
> Is this definitely the case for all of the IPs using this driver? It
> seems like something which might have been present in actual PXA
> implemenetations but got fixed in later revisons used with x86. Equally
> well the current code is clearly broken either way so I'm not sure that
> problems with older systems should be a barrier to merging the patch but
> it seems better to check.
This code came with x86 LPSS implementation originally. The PXA one,
which lives in a different file (spi-pxa2xx-pxadma.c) didn't have any
such checks AFAIK.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/