Re: [PATCH 3/4] mmci: sync DATAEND irq with dma|pio transfer done

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

 



On Tue, Jun 28, 2011 at 09:57:40AM +0200, Linus Walleij wrote:
> From: Ulf Hansson <ulf.hansson@xxxxxxxxxxxxxx>
> 
> The end of a dma|pio data transfer is synced with the
> DATAEND irq. This will prevent the mmci driver from ending
> the request before the dma|pio job is completely done.
> 
> For dma we use DMA_PREP_INTERRUPT to register a callback
> function which is called when dma driver is done with job.
> 
> To also make sure we prevent hanging forever, waiting for
> DATAEND irq or a dma|pio transfer to be done, we setup a timer
> when either a DATAEND or dma|pio job is done. Once both
> conditions have occured, the timer is cancelled and the data
> transfer is completed.
> 
> If a timeout occurs, the data transfer is terminated in a
> controlled manner and EAGAIN is returned to the framework.
> A timeout value of 50 ms has been found to work well for
> our usecases.

What is the framework supposed to do with that error code?  Magic the
driver into disabling DMA by some non-existant callback?

Please, stop introducing magic new error codes which have no meaning to
the upper levels unless you're also going to add some handling of those
error conditions as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux