All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@stericsson.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Linus WALLEIJ <linus.walleij@stericsson.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH 3/4] mmci: sync DATAEND irq with dma|pio transfer done
Date: Tue, 23 Aug 2011 12:10:31 +0200	[thread overview]
Message-ID: <4E537C97.4020800@stericsson.com> (raw)
In-Reply-To: <20110705112533.GY8286@n2100.arm.linux.org.uk>

Russell King - ARM Linux wrote:
> On Tue, Jun 28, 2011 at 09:57:40AM +0200, Linus Walleij wrote:
>> From: Ulf Hansson <ulf.hansson@stericsson.com>
>>
>> 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.
> 

The idea was to trigger a resend from the mmc framework, but I noticed 
that the mmc_blk_issue_rw_rq has been patched quite a lot lately. I will 
revisit this again to see if it still makes sense.



WARNING: multiple messages have this Message-ID (diff)
From: ulf.hansson@stericsson.com (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] mmci: sync DATAEND irq with dma|pio transfer done
Date: Tue, 23 Aug 2011 12:10:31 +0200	[thread overview]
Message-ID: <4E537C97.4020800@stericsson.com> (raw)
In-Reply-To: <20110705112533.GY8286@n2100.arm.linux.org.uk>

Russell King - ARM Linux wrote:
> On Tue, Jun 28, 2011 at 09:57:40AM +0200, Linus Walleij wrote:
>> From: Ulf Hansson <ulf.hansson@stericsson.com>
>>
>> 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.
> 

The idea was to trigger a resend from the mmc framework, but I noticed 
that the mmc_blk_issue_rw_rq has been patched quite a lot lately. I will 
revisit this again to see if it still makes sense.

  reply	other threads:[~2011-08-23 10:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-28  7:57 [PATCH 3/4] mmci: sync DATAEND irq with dma|pio transfer done Linus Walleij
2011-06-28  7:57 ` Linus Walleij
2011-07-05 11:25 ` Russell King - ARM Linux
2011-07-05 11:25   ` Russell King - ARM Linux
2011-08-23 10:10   ` Ulf Hansson [this message]
2011-08-23 10:10     ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E537C97.4020800@stericsson.com \
    --to=ulf.hansson@stericsson.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.