public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP: Fix possible un-initialized waitqueue in McBSP
@ 2008-09-19 13:36 Jarkko Nikula
  2008-09-22 13:30 ` Jarkko Nikula
  2008-09-22 13:47 ` [PATCH] ARM: OMAP: Fixes to omap_mcbsp_request function Jarkko Nikula
  0 siblings, 2 replies; 4+ messages in thread
From: Jarkko Nikula @ 2008-09-19 13:36 UTC (permalink / raw)
  To: linux-omap; +Cc: Jarkko Nikula

TX or RX irq waitqueues are un-initialized if interrupt would occur
immediately after requesting it. I don't know is it HW failure, but one
Beagle board is showing spurious TX interrupt from McBSP2 (and only from it)
just after requesting it.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
 arch/arm/plat-omap/mcbsp.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 7d32437..1b5d709 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -236,6 +236,7 @@ int omap_mcbsp_request(unsigned int id)
 
 	if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
 		/* We need to get IRQs here */
+		init_completion(&mcbsp->tx_irq_completion);
 		err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler,
 					0, "McBSP", (void *)mcbsp);
 		if (err != 0) {
@@ -245,8 +246,7 @@ int omap_mcbsp_request(unsigned int id)
 			return err;
 		}
 
-		init_completion(&mcbsp->tx_irq_completion);
-
+		init_completion(&mcbsp->rx_irq_completion);
 		err = request_irq(mcbsp->rx_irq, omap_mcbsp_rx_irq_handler,
 					0, "McBSP", (void *)mcbsp);
 		if (err != 0) {
@@ -256,8 +256,6 @@ int omap_mcbsp_request(unsigned int id)
 			free_irq(mcbsp->tx_irq, (void *)mcbsp);
 			return err;
 		}
-
-		init_completion(&mcbsp->rx_irq_completion);
 	}
 
 	return 0;
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-24  9:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-19 13:36 [PATCH] ARM: OMAP: Fix possible un-initialized waitqueue in McBSP Jarkko Nikula
2008-09-22 13:30 ` Jarkko Nikula
2008-09-22 13:47 ` [PATCH] ARM: OMAP: Fixes to omap_mcbsp_request function Jarkko Nikula
2008-09-24  9:11   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox