public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/4] USB: musb: add missing unlock in cppi_interrupt()
@ 2011-03-20 11:14 Dan Carpenter
  2011-03-20 14:02 ` Sergei Shtylyov
  2011-03-22  9:21 ` Felipe Balbi
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2011-03-20 11:14 UTC (permalink / raw)
  To: kernel-janitors

We should unlock before returning here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Compile tested only.  Isn't cppi->irq always true at this point?

diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index de55a3c..6385eeb 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -1167,8 +1167,11 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
 	tx = musb_readl(tibase, DAVINCI_TXCPPI_MASKED_REG);
 	rx = musb_readl(tibase, DAVINCI_RXCPPI_MASKED_REG);
 
-	if (!tx && !rx)
+	if (!tx && !rx) {
+		if (cppi->irq)
+			spin_unlock_irqrestore(&musb->lock, flags);
 		return IRQ_NONE;
+	}
 
 	DBG(4, "CPPI IRQ Tx%x Rx%x\n", tx, rx);
 

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

* Re: [patch 1/4] USB: musb: add missing unlock in cppi_interrupt()
  2011-03-20 11:14 [patch 1/4] USB: musb: add missing unlock in cppi_interrupt() Dan Carpenter
@ 2011-03-20 14:02 ` Sergei Shtylyov
  2011-03-22  9:21 ` Felipe Balbi
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2011-03-20 14:02 UTC (permalink / raw)
  To: kernel-janitors

Hello.

On 20-03-2011 14:14, Dan Carpenter wrote:

> We should unlock before returning here.

> Signed-off-by: Dan Carpenter<error27@gmail.com>
> ---
> Compile tested only.  Isn't cppi->irq always true at this point?

    No. It's only true for DM646x, and false for other DaVincis.

> diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
> index de55a3c..6385eeb 100644
> --- a/drivers/usb/musb/cppi_dma.c
> +++ b/drivers/usb/musb/cppi_dma.c
> @@ -1167,8 +1167,11 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
>   	tx = musb_readl(tibase, DAVINCI_TXCPPI_MASKED_REG);
>   	rx = musb_readl(tibase, DAVINCI_RXCPPI_MASKED_REG);
>
> -	if (!tx && !rx)
> +	if (!tx && !rx) {
> +		if (cppi->irq)
> +			spin_unlock_irqrestore(&musb->lock, flags);
>   		return IRQ_NONE;
> +	}
>
>   	DBG(4, "CPPI IRQ Tx%x Rx%x\n", tx, rx);

    Thanks for fixing this.

WBR, Sergei

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

* Re: [patch 1/4] USB: musb: add missing unlock in cppi_interrupt()
  2011-03-20 11:14 [patch 1/4] USB: musb: add missing unlock in cppi_interrupt() Dan Carpenter
  2011-03-20 14:02 ` Sergei Shtylyov
@ 2011-03-22  9:21 ` Felipe Balbi
  1 sibling, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2011-03-22  9:21 UTC (permalink / raw)
  To: kernel-janitors

On Sun, Mar 20, 2011 at 02:14:36PM +0300, Dan Carpenter wrote:
> We should unlock before returning here.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

applied, thanks

-- 
balbi

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

end of thread, other threads:[~2011-03-22  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-20 11:14 [patch 1/4] USB: musb: add missing unlock in cppi_interrupt() Dan Carpenter
2011-03-20 14:02 ` Sergei Shtylyov
2011-03-22  9:21 ` Felipe Balbi

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