From: Kevin Hilman <khilman@mvista.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] ARM: OMAP: MUSB: DMA interrupt locking fix
Date: Fri, 31 Aug 2007 16:31:06 -0700 [thread overview]
Message-ID: <20070831233106.164731855@mvista.com> (raw)
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>
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;
}
--
next reply other threads:[~2007-08-31 23:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-31 23:31 Kevin Hilman [this message]
2007-09-01 2:15 ` [PATCH] ARM: OMAP: MUSB: DMA interrupt locking fix David Brownell
2007-09-17 18:23 ` Tony Lindgren
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=20070831233106.164731855@mvista.com \
--to=khilman@mvista.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox