linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A problem with shared interrupts
@ 2007-07-26 20:13 Larry Finger
  2007-07-26 22:42 ` Michael Buesch
  2007-07-27  9:54 ` Johannes Berg
  0 siblings, 2 replies; 5+ messages in thread
From: Larry Finger @ 2007-07-26 20:13 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Bcm43xx-dev, linux-wireless

Michael,

When I try the -mb tree on my old i386 notebook, I get an "irq 11: nobody cared"
message and interrupts for the bcm43xx-mac80211 device are not initialized. The
code in Linville's tree works. The only difference that seems to be important
is the code returned when a shared interrupt not intended for us is received.
By making the changes shown below, both trees now work.

I recall you having a discussion with someone over some aspect of shared IRQ's,
but I don't remember the details and I'm too busy (lazy) to go back and look.

Thanks,

Larry
----

Index: wireless-mb/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c
===================================================================
--- wireless-mb.orig/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c
+++ wireless-mb/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c
@@ -1503,7 +1503,7 @@ static void bcm43xx_interrupt_ack(struct
 /* Interrupt handler top-half */
 static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id)
 {
-	irqreturn_t ret = IRQ_NONE;
+	irqreturn_t ret = IRQ_HANDLED;
 	struct bcm43xx_wldev *dev = dev_id;
 	u32 reason;
 
@@ -1517,7 +1517,6 @@ static irqreturn_t bcm43xx_interrupt_han
 	reason = bcm43xx_read32(dev, BCM43xx_MMIO_GEN_IRQ_REASON);
 	if (reason == 0xffffffff) /* shared IRQ */
 		goto out;
-	ret = IRQ_HANDLED;
 	reason &= bcm43xx_read32(dev, BCM43xx_MMIO_GEN_IRQ_MASK);
 	if (!reason)
 		goto out;

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

* Re: A problem with shared interrupts
  2007-07-26 20:13 A problem with shared interrupts Larry Finger
@ 2007-07-26 22:42 ` Michael Buesch
  2007-07-27  0:04   ` Larry Finger
  2007-07-27  9:54 ` Johannes Berg
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Buesch @ 2007-07-26 22:42 UTC (permalink / raw)
  To: Larry Finger; +Cc: Bcm43xx-dev, linux-wireless

On Thursday 26 July 2007 22:13:54 Larry Finger wrote:
> Michael,
> 
> When I try the -mb tree on my old i386 notebook, I get an "irq 11: nobody cared"
> message and interrupts for the bcm43xx-mac80211 device are not initialized. The
> code in Linville's tree works. The only difference that seems to be important
> is the code returned when a shared interrupt not intended for us is received.
> By making the changes shown below, both trees now work.
> 
> I recall you having a discussion with someone over some aspect of shared IRQ's,
> but I don't remember the details and I'm too busy (lazy) to go back and look.
> 
> Thanks,
> 
> Larry
> ----
> 
> Index: wireless-mb/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c
> ===================================================================
> --- wireless-mb.orig/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c
> +++ wireless-mb/drivers/net/wireless/mac80211/bcm43xx/bcm43xx_main.c
> @@ -1503,7 +1503,7 @@ static void bcm43xx_interrupt_ack(struct
>  /* Interrupt handler top-half */
>  static irqreturn_t bcm43xx_interrupt_handler(int irq, void *dev_id)
>  {
> -	irqreturn_t ret = IRQ_NONE;
> +	irqreturn_t ret = IRQ_HANDLED;
>  	struct bcm43xx_wldev *dev = dev_id;
>  	u32 reason;
>  
> @@ -1517,7 +1517,6 @@ static irqreturn_t bcm43xx_interrupt_han
>  	reason = bcm43xx_read32(dev, BCM43xx_MMIO_GEN_IRQ_REASON);
>  	if (reason == 0xffffffff) /* shared IRQ */
>  		goto out;
> -	ret = IRQ_HANDLED;
>  	reason &= bcm43xx_read32(dev, BCM43xx_MMIO_GEN_IRQ_MASK);
>  	if (!reason)
>  		goto out;
> 
> 

I neither think this is the correct solution, nor do I think that this
is the way bcm43xx-softmac does it. This would always return HANDLED, right?
regardless if the IRQ was for bcm43xx or not. I _do_ think that the bug is
in the driver sharing the IRQ with bcm43xx.

-- 
Greetings Michael.

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

* Re: A problem with shared interrupts
  2007-07-26 22:42 ` Michael Buesch
@ 2007-07-27  0:04   ` Larry Finger
  0 siblings, 0 replies; 5+ messages in thread
From: Larry Finger @ 2007-07-27  0:04 UTC (permalink / raw)
  To: Michael Buesch; +Cc: linux-wireless, Bcm43xx-dev

Michael Buesch wrote:
> 
> I neither think this is the correct solution, nor do I think that this
> is the way bcm43xx-softmac does it. This would always return HANDLED, right?
> regardless if the IRQ was for bcm43xx or not. I _do_ think that the bug is
> in the driver sharing the IRQ with bcm43xx.
> 

I misread the bcm43xx-mac80211 code from Linville's tree. clearly my patch is wrong. I'll have to 
find the differences between the two trees in drivers that share that IRQ. Fortunately, it is only 
yenta and bcm4301.

Larry



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

* Re: A problem with shared interrupts
  2007-07-26 20:13 A problem with shared interrupts Larry Finger
  2007-07-26 22:42 ` Michael Buesch
@ 2007-07-27  9:54 ` Johannes Berg
  2007-07-27 14:36   ` Larry Finger
  1 sibling, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2007-07-27  9:54 UTC (permalink / raw)
  To: Larry Finger; +Cc: Michael Buesch, linux-wireless, Bcm43xx-dev

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

On Thu, 2007-07-26 at 15:13 -0500, Larry Finger wrote:
> Michael,
> 
> When I try the -mb tree on my old i386 notebook, I get an "irq 11: nobody cared"
> message and interrupts for the bcm43xx-mac80211 device are not initialized.

Hm. Just a thought about something related: do you have 'debug shared
interrupts' on?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: A problem with shared interrupts
  2007-07-27  9:54 ` Johannes Berg
@ 2007-07-27 14:36   ` Larry Finger
  0 siblings, 0 replies; 5+ messages in thread
From: Larry Finger @ 2007-07-27 14:36 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Michael Buesch, linux-wireless, Bcm43xx-dev

Johannes Berg wrote:
> On Thu, 2007-07-26 at 15:13 -0500, Larry Finger wrote:
>> Michael,
>>
>> When I try the -mb tree on my old i386 notebook, I get an "irq 11: nobody cared"
>> message and interrupts for the bcm43xx-mac80211 device are not initialized.
> 
> Hm. Just a thought about something related: do you have 'debug shared
> interrupts' on?

No I didn't. Thanks for the suggestion.

Larry

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

end of thread, other threads:[~2007-07-27 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26 20:13 A problem with shared interrupts Larry Finger
2007-07-26 22:42 ` Michael Buesch
2007-07-27  0:04   ` Larry Finger
2007-07-27  9:54 ` Johannes Berg
2007-07-27 14:36   ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).