All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: David Brownell <david-b@pacbell.net>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] ARM: OMAP: MUSB: DMA interrupt locking fix
Date: Mon, 17 Sep 2007 11:23:38 -0700	[thread overview]
Message-ID: <20070917182338.GE21226@atomide.com> (raw)
In-Reply-To: <20070901021506.8766A2371C9@adsl-69-226-248-13.dsl.pltn13.pacbell.net>

* David Brownell <david-b@pacbell.net> [070831 19:18]:
> > From linux-omap-open-source-bounces@linux.omap.com  Fri Aug 31 16:33:15 2007
> > Date: Fri, 31 Aug 2007 16:31:06 -0700
> > From: Kevin Hilman <khilman@mvista.com>
> > To: linux-omap-open-source@linux.omap.com
> > Subject: [PATCH] ARM: OMAP: MUSB: DMA interrupt locking fix
> >
> > dma_controller_irq() should take the lock (and disable interrupts) as
> > the main interrupt handler does since the functions it calls assume
> > this to be the case.
> >
> > Signed-off-by: Kevin Hilman <khilman@mvista.com>
> 
> Ack.
> 
> > Index: dev/drivers/usb/musb/musbhsdma.c
> > ===================================================================
> > --- dev.orig/drivers/usb/musb/musbhsdma.c
> > +++ dev/drivers/usb/musb/musbhsdma.c
> > @@ -296,6 +296,7 @@ static irqreturn_t dma_controller_irq(in
> >  	struct musb_dma_controller *controller =
> >  		(struct musb_dma_controller *)private_data;
> >  	struct musb_dma_channel *pImplChannel;
> > +	struct musb *musb = controller->pDmaPrivate;
> >  	u8 *mbase = controller->pCoreBase;
> >  	struct dma_channel *pChannel;
> >  	u8 bChannel;
> > @@ -303,6 +304,9 @@ static irqreturn_t dma_controller_irq(in
> >  	u32 dwAddress;
> >  	u8 int_hsdma;
> >  	irqreturn_t retval = IRQ_NONE;
> > +	unsigned long flags;
> > +
> > +	spin_lock_irqsave(&musb->lock, flags);
> >  
> >  	int_hsdma = musb_readb(mbase, MUSB_HSDMA_INTR);
> >  	if (!int_hsdma)
> > @@ -358,7 +362,7 @@ static irqreturn_t dma_controller_irq(in
> >  						MUSB_TXCSR_TXPKTRDY);
> >  				} else
> >  					musb_dma_completion(
> > -						controller->pDmaPrivate,
> > +						musb,
> >  						pImplChannel->epnum,
> >  						pImplChannel->transmit);
> >  			}
> > @@ -366,6 +370,7 @@ static irqreturn_t dma_controller_irq(in
> >  	}
> >  	retval = IRQ_HANDLED;
> >  done:
> > +	spin_unlock_irqrestore(&musb->lock, flags);
> >  	return retval;
> >  }

Pushing this today.

Tony

      reply	other threads:[~2007-09-17 18:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-31 23:31 [PATCH] ARM: OMAP: MUSB: DMA interrupt locking fix Kevin Hilman
2007-09-01  2:15 ` David Brownell
2007-09-17 18:23   ` Tony Lindgren [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=20070917182338.GE21226@atomide.com \
    --to=tony@atomide.com \
    --cc=david-b@pacbell.net \
    --cc=linux-omap-open-source@linux.omap.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 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.