linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ulf.hansson@stericsson.com (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmc: mmci: Fixup error handling for dma
Date: Mon, 5 Dec 2011 18:00:08 +0100	[thread overview]
Message-ID: <4EDCF898.7080604@stericsson.com> (raw)
In-Reply-To: <CACRpkdacJxbFvSuXTsxtjZVbeTaJwNN4xy7-rvpa0U0Z4pDE_g@mail.gmail.com>

Linus Walleij wrote:
> On Wed, Nov 30, 2011 at 11:21 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> 
>>>       if (!cmd->data || cmd->error) {
>>> -             if (host->data)
>>> +             if (host->data) {
>>> +                     /* Terminate the DMA transfer */
>>> +                     if (dma_inprogress(host))
>>> +                             mmci_dma_data_error(host);
>> Doesn't this leave the DMA buffers mapped?

Correct, but it will be handled in post_request function.

> 
> Yep it needs an mmci_dma_unmap() call too AFAICT,
> Ulf will you update?

Actually it's needs only dma_unmap_sg, but as stated this should be 
handled in mmci_post_request.

By, the way - I spoke to Per F?rlin who implemented the pre_request and 
post_request functions; we will soon push some clean-up patches for 
improved error handling and how to manage the cookie better. Right now 
it is kind of hard to follow the error path, I think. We hope this shall 
be improved then.

Although it should have nothing to do with this patch directly, since 
this is a bugfix only.

BR
Ulf Hansson

      reply	other threads:[~2011-12-05 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 14:51 [PATCH] mmc: mmci: Fixup error handling for dma Ulf Hansson
2011-11-30 13:06 ` Linus Walleij
2011-11-30 22:21 ` Russell King - ARM Linux
2011-12-01 13:01   ` Linus Walleij
2011-12-05 17:00     ` Ulf Hansson [this message]

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=4EDCF898.7080604@stericsson.com \
    --to=ulf.hansson@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).