public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] libertas: fix interrupt issue
@ 2008-06-05 11:06 Holger Schurig
  2008-06-05 11:34 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Schurig @ 2008-06-05 11:06 UTC (permalink / raw)
  To: libertas-dev, Dan Williams, linux-wireless, John W. Linville

This helps against lost interrupts and aids in debugging this.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

Index: wireless-testing/drivers/net/wireless/libertas/if_cs.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/libertas/if_cs.c	2008-05-30 11:26:35.000000000 +0200
+++ wireless-testing/drivers/net/wireless/libertas/if_cs.c	2008-05-30 11:30:09.000000000 +0200
@@ -379,6 +379,8 @@ static irqreturn_t if_cs_interrupt(int i
 
 	/* Ask card interrupt cause register if there is something for us */
 	cause = if_cs_read16(card, IF_CS_CARD_INT_CAUSE);
+	lbs_deb_cs("cause 0x%04x\n", cause);
+
 	if (cause == 0) {
 		/* Not for us */
 		return IRQ_NONE;
@@ -390,10 +392,6 @@ static irqreturn_t if_cs_interrupt(int i
 		return IRQ_HANDLED;
 	}
 
-	/* Clear interrupt cause */
-	if_cs_write16(card, IF_CS_CARD_INT_CAUSE, cause & IF_CS_BIT_MASK);
-	lbs_deb_cs("cause 0x%04x\n", cause);
-
 	if (cause & IF_CS_BIT_RX) {
 		struct sk_buff *skb;
 		lbs_deb_cs("rx packet\n");
@@ -434,6 +432,9 @@ static irqreturn_t if_cs_interrupt(int i
 		lbs_queue_event(priv, event >> 8 & 0xff);
 	}
 
+	/* Clear interrupt cause */
+	if_cs_write16(card, IF_CS_CARD_INT_CAUSE, cause & IF_CS_BIT_MASK);
+
 	lbs_deb_leave(LBS_DEB_CS);
 	return IRQ_HANDLED;
 }

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

* Re: [PATCH 1/3] libertas: fix interrupt issue
  2008-06-05 11:06 [PATCH 1/3] libertas: fix interrupt issue Holger Schurig
@ 2008-06-05 11:34 ` Dan Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2008-06-05 11:34 UTC (permalink / raw)
  To: Holger Schurig; +Cc: libertas-dev, linux-wireless, John W. Linville

On Thu, 2008-06-05 at 13:06 +0200, Holger Schurig wrote:
> This helps against lost interrupts and aids in debugging this.
> 
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

Acked-by: Dan Williams <dcbw@redhat.com>

> Index: wireless-testing/drivers/net/wireless/libertas/if_cs.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/if_cs.c	2008-05-30 11:26:35.000000000 +0200
> +++ wireless-testing/drivers/net/wireless/libertas/if_cs.c	2008-05-30 11:30:09.000000000 +0200
> @@ -379,6 +379,8 @@ static irqreturn_t if_cs_interrupt(int i
>  
>  	/* Ask card interrupt cause register if there is something for us */
>  	cause = if_cs_read16(card, IF_CS_CARD_INT_CAUSE);
> +	lbs_deb_cs("cause 0x%04x\n", cause);
> +
>  	if (cause == 0) {
>  		/* Not for us */
>  		return IRQ_NONE;
> @@ -390,10 +392,6 @@ static irqreturn_t if_cs_interrupt(int i
>  		return IRQ_HANDLED;
>  	}
>  
> -	/* Clear interrupt cause */
> -	if_cs_write16(card, IF_CS_CARD_INT_CAUSE, cause & IF_CS_BIT_MASK);
> -	lbs_deb_cs("cause 0x%04x\n", cause);
> -
>  	if (cause & IF_CS_BIT_RX) {
>  		struct sk_buff *skb;
>  		lbs_deb_cs("rx packet\n");
> @@ -434,6 +432,9 @@ static irqreturn_t if_cs_interrupt(int i
>  		lbs_queue_event(priv, event >> 8 & 0xff);
>  	}
>  
> +	/* Clear interrupt cause */
> +	if_cs_write16(card, IF_CS_CARD_INT_CAUSE, cause & IF_CS_BIT_MASK);
> +
>  	lbs_deb_leave(LBS_DEB_CS);
>  	return IRQ_HANDLED;
>  }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

end of thread, other threads:[~2008-06-05 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-05 11:06 [PATCH 1/3] libertas: fix interrupt issue Holger Schurig
2008-06-05 11:34 ` Dan Williams

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