libertas: fix interrupt issue
PATCH 1/3 libertas: fix interrupt issue
This helps against lost interrupts and aids in debugging this.
Signed-off-by Holger Schurig <[email protected]>
drivers/net/wireless/libertas/if_cs.c +5 -4
@@ -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 ireturn 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 ilbs_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 ; }
Quoted 3 lines · Holger Schurig
This helps against lost interrupts and aids in debugging this.
Signed-off-by Holger Schurig <[email protected]>
Acked-by Dan Williams <[email protected]>
Quoted 38 lines
Index:
wireless-testing/drivers/net/wireless/libertas/if_cs.c
===================================================================drivers/net/wireless/libertas/if_cs.c +5
-5@@ -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 ireturn 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 ilbs_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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html