mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: haavard.skinnemoen@atmel.com
Cc: linux-kernel@vger.kernel.org, maciej.sosnowski@intel.com,
	dan.j.williams@intel.com
Subject: Re: dw_dmac driver questions
Date: Tue, 06 Jan 2009 23:31:10 +0900 (JST)	[thread overview]
Message-ID: <20090106.233110.106262211.anemo@mba.ocn.ne.jp> (raw)
In-Reply-To: <20090106111403.2bdc0f83@hskinnemoen-d830>

On Tue, 6 Jan 2009 11:14:03 +0100, Haavard Skinnemoen <haavard.skinnemoen@atmel.com> wrote:
> > 1) driver enqueue desc A to active list and start DMA engine
> > 2) driver enqueue desc B to queue list
> > 3) driver enqueue desc C to queue list  (desc C contains bad address)
> > 4) DMA engine finish desc A and raise interrupt
> > 5) tasklet remove desc A from active list and move desc B and C to active list
> > 6) DMA engine finish desc B and raise interrupt
> > 7) DMA engine abort desc C and raise interrupt
> > 8) tasklet detect error
> > 
> > The point is the order of (7) and (8) cannot be expected.  If (7)
> > comes first, the head of the active list contains desc B at (8) and
> > that is not a bad descriptor.
> 
> The tasklet won't detect any errors unless the DMA controller flags it,
> so (7) must happen before (8). That does not necessarily mean that the
> interrupts from (6) and (7) get handled before (8), but I don't think
> it matters because dwc_handle_error() calls dwc_scan_descriptors(),
> which will remove desc B from the active list if it is finished. And it
> must be finished if desc C has failed, so the failed descriptor will
> always be at the head of the queue after dwc_scan_descriptors() returns.

Oh I understand.  I overlooked dwc_scan_descriptors() call at
beginning of dwc_handle_error().  Thank you for explanation.

---
Atsushi Nemoto

      reply	other threads:[~2009-01-06 14:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29 14:39 Atsushi Nemoto
2009-01-05 14:02 ` Atsushi Nemoto
2009-01-09 14:06   ` Atsushi Nemoto
2009-01-05 14:30 ` Haavard Skinnemoen
2009-01-05 15:35   ` Atsushi Nemoto
2009-01-05 15:48     ` Haavard Skinnemoen
2009-01-06  1:33       ` Atsushi Nemoto
2009-01-06 10:14         ` Haavard Skinnemoen
2009-01-06 14:31           ` Atsushi Nemoto [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=20090106.233110.106262211.anemo@mba.ocn.ne.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=dan.j.williams@intel.com \
    --cc=haavard.skinnemoen@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.sosnowski@intel.com \
    /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

all inboxes | Powered by JetHome®