On Sat, 29 Aug 2020 20:30:04 +0200 Lars-Peter Clausen <lars@xxxxxxxxxx> wrote: > On 8/29/20 5:51 PM, Jonathan Cameron wrote: > > On Wed, 26 Aug 2020 09:36:39 +0300 > > Alexandru Ardelean <ardeleanalex@xxxxxxxxx> wrote: > > > >> On Wed, Aug 26, 2020 at 8:22 AM Lars-Peter Clausen <lars@xxxxxxxxxx> wrote: > >>> From: Alexandru Ardelean <alexandru.ardelean@xxxxxxxxxx> > >>> > >>> A transfer may fall shorter than the bytes in the block. > >>> This information is available in the residue from the DMA engine, so we can > >>> compute actual `bytes_used` with that by subtracting the residue. > >>> > >> This was in my pipeline as well [obviously]. > >> Thanks :) > >> > >>> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@xxxxxxxxxx> > >>> Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx> > > "smells" like a fix. Is it? Or are we looking at something that > > only matters for some future hardware, or an optmization? > > > > If it's a fix, where is the fixes tag? > > It's a feature :) > > When we first added the IIO DMA buffer support this API did not exist in > dmaengine. So for the longest time most DMA drivers did not have the > ability to report short transfers. Primarily because in many cases the > hardware doesn't even support it. > > Now with this patch the IIO DMA buffer implementation supports systems > where the DMA can generate short transfers. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > > - Lars >