Re: [PATCH v2 1/1] spi: dw: move to SPI core message handling

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

 



On Wed, Feb 25, 2015 at 06:53:24PM +0200, Andy Shevchenko wrote:

> 1. The message status override (discussion in a separate thread).
> Summary: we may and must use message->status to indicate an error, if
> any, is happened during transfer, e.g. overrun/underrun interrupt, am I
> correct?

Yes, of course.

> 2. How to handle timeout error in case of asynchronous transfers, when
> transfer_one() sets DMA and returns 1? In transfer_one() I setup DMA
> descriptors and in case of bad luck and getting many timeouts in a row
> the DMA Engine would come to lack of memory, thus I would like to
> terminate any ongoing DMA transfers. Moreover, spi_unmap_msg() does
> unmapping before calling unprepare_message(). I'm not sure if it's okay
> in DMA case to terminate transfers in unprepare_message(), would it be
> already late?

That sounds like a reasonable concern.  Feel free to add any missing
features like cleanup callbacks to the frameworks, one of the advantages
Linux has is that we can extend the frameworks rather than having to
work around them.  Though perhaps the core can just terminate any DMAs
it knows about, I haven't looked to see if the DMA code will get upset
about double terminations?

Attachment: signature.asc
Description: Digital signature


[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