linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mika.westerberg@iki.fi (Mika Westerberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ep93xx: Implement double buffering for M2M DMA channels
Date: Thu, 22 Mar 2012 22:03:39 +0200	[thread overview]
Message-ID: <20120322200339.GA5812@mwesterb-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F0020696D48CAF@AUSP01VMBX24.collaborationhost.net>

On Thu, Mar 22, 2012 at 01:52:52PM -0500, H Hartley Sweeten wrote:

> I hacked this back to the handle_one_vic function. It looks like every time
> I get the message above the stat read in that function shows an active
> interrupt for DMAM2M0 (the dma rx channel) and DMAM2M1 (the dma
> tx channel). Because of the way handle_one_vic processes the irq's, the
> DMAM2M0 interrupt gets handled first. When it's done it must be clearing
> the DMAM2M1 interrupt automatically for some reason. So, when it's
> handled there is no interrupt pending so we get the message.
> 
> The "cleanest" fix I can think of is the following patch.  This is against
> linux-next.

I can't figure out any better fix unless we move ep93xx back to use
!MULTI_IRQ_HANDLER which obviously is not good thing to do.

> From: H Hartley Sweeten <hsweeten@visionengravers.com>
> 
> dma: ep93xx: check for spurious interrupts
> 
> The ep93xx dma controller generates spurious interrupts on dma1chan1 when
> used with the mmc_spi driver. Catch these early by making sure there is an
> interrupt to actually process.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Tested-by: Mika Westerberg <mika.westerberg@iki.fi>

Thanks for investigating this. You missed one thing though, see below.
Otherwise it doesn't compile :)

diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index e1cc87a..614bff4 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -751,7 +751,7 @@ static irqreturn_t ep93xx_dma_interrupt(int irq, void *dev_id)
 		return IRQ_NONE;
 	}
 
-	switch (edmac->edma->hw_interrupt(edmac)) {
+	switch (edmac->edma->hw_interrupt(edmac, irq_status)) {
 	case INTERRUPT_DONE:
 		desc->complete = true;
 		tasklet_schedule(&edmac->tasklet);

  reply	other threads:[~2012-03-22 20:03 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20  8:09 [PATCH] ep93xx: Implement double buffering for M2M DMA channels Rafal Prylowski
2012-03-21  7:07 ` Mika Westerberg
2012-03-21  7:47   ` Rafal Prylowski
2012-03-21 19:33     ` Mika Westerberg
2012-03-21 17:12 ` H Hartley Sweeten
2012-03-21 19:32   ` Mika Westerberg
2012-03-22  0:47     ` H Hartley Sweeten
2012-03-22  7:37       ` Mika Westerberg
2012-03-22 18:52         ` H Hartley Sweeten
2012-03-22 20:03           ` Mika Westerberg [this message]
2012-03-22 21:36             ` H Hartley Sweeten
2012-03-22 23:56             ` H Hartley Sweeten
2012-03-23  7:00               ` Mika Westerberg
2012-03-22 10:16   ` Rafal Prylowski
2012-03-21 19:38 ` Mika Westerberg
2012-03-23  2:19   ` H Hartley Sweeten
2012-03-23  7:04     ` Mika Westerberg
2012-03-23 16:09       ` H Hartley Sweeten
2012-03-24  7:32         ` Mika Westerberg
2012-03-26  6:44           ` Rafal Prylowski
2012-03-29 22:33           ` H Hartley Sweeten
2012-04-01 18:49             ` Mika Westerberg
2012-04-10 17:28         ` Mika Westerberg
2012-04-10 17:55           ` H Hartley Sweeten
2012-04-11  7:18             ` Rafal Prylowski
2012-04-16 18:59               ` H Hartley Sweeten
2012-04-17  7:15                 ` Rafal Prylowski
2012-04-17 15:46                   ` H Hartley Sweeten
2012-04-17 20:51                     ` H Hartley Sweeten
2012-04-18 16:41                       ` Rafal Prylowski
2012-04-18 17:01                         ` H Hartley Sweeten
2012-03-22  0:57 ` Ryan Mallon
2012-03-22 10:00   ` Rafal Prylowski
2012-03-22 13:14     ` Sergei Shtylyov
2012-03-22 14:13       ` Rafal Prylowski

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=20120322200339.GA5812@mwesterb-mobl.ger.corp.intel.com \
    --to=mika.westerberg@iki.fi \
    --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).