Re: [PATCH] spi: omap2-mcspi: fix dma transfer for vmalloced buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-04-08 2:57 GMT+09:00 Mark Brown <broonie@xxxxxxxxxx>:
> On Thu, Apr 07, 2016 at 09:17:29PM +0900, Akinobu Mita wrote:
>> 2016-03-22 1:00 GMT+09:00 Akinobu Mita <akinobu.mita@xxxxxxxxx>:
>
>> >                 if ((l & OMAP2_MCSPI_CHCONF_TURBO) && mcspi->fifo_depth == 0)
>> >                         dma_count -= es;
>
>> The actual transfer length can be smaller than xfer->len by above line.
>> And the last word is filled after dma transfer completion.
>
>> So this patch is broken.  Could you revert remove this from your
>> development tree?
>> I don't find a way how to fix it without copy and pasting a lot of
>> line from spi core.
>
> Can you please send a patch doing the revert and explaining why we can't
> do this in the changelog?  That might help someone else looking at this
> to figure it out in future, or at least stop them trying the same thing
> and running into problems.

I'm going to come up with a fix that detects xfer->len != dma_count
and remap rx_sg in omap2_mcspi_rx_dma().  But I plan to spend
enough time tesing it, so feel free to apply revert that I sent a while ago.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux