netdev
[Top] [All Lists]

Re: [PATCH wireless-2.6 7/10] hostap: Rate limiting for debug messages

To: Jeff Garzik <jgarzik@xxxxxxxxx>
Subject: Re: [PATCH wireless-2.6 7/10] hostap: Rate limiting for debug messages
From: Jouni Malinen <jkmaline@xxxxxxxxx>
Date: Thu, 24 Mar 2005 18:46:18 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <4240A638.8090702@xxxxxxxxx>
References: <20050313001706.GA8253@xxxxxxxxx> <20050313003412.GH8253@xxxxxxxxx> <4240A638.8090702@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.8i
On Tue, Mar 22, 2005 at 06:11:52PM -0500, Jeff Garzik wrote:

> >--- jm-wireless-2.6.orig/drivers/net/wireless/hostap/hostap_hw.c 
> >2005-03-12 16:10:40.000000000 -0800
> >+++ jm-wireless-2.6/drivers/net/wireless/hostap/hostap_hw.c  2005-03-12 
> >16:10:58.000000000 -0800
> >@@ -2790,8 +2790,10 @@
> >     prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0);
> > 
> >     if (local->func->card_present && !local->func->card_present(local)) {
> >-            printk(KERN_DEBUG "%s: Interrupt, but dev not OK\n",
> >-                   dev->name);
> >+            if (net_ratelimit()) {
> >+                    printk(KERN_DEBUG "%s: Interrupt, but dev not OK\n",
> >+                           dev->name);
> >+            }
> >             return IRQ_HANDLED;


> Patch is OK, but it highlights a bug:
> 
> You should return IRQ_NONE if the interrupt is not intended for your 
> hardware.

I'm trying to remember why this was set to IRQ_HANDLED, not IRQ_NONE..
If I remember correctly, every now and then, an interrupt is generated
when removing the PC Card and this ends up getting here. In other words,
the interrupt was actually sort of generated by the hardware device
controlled by the driver. Should this return IRQ_NONE even in that case?
I thought that could end up disabling the IRQ which could also affect
other devices that are sharing the same IRQ.

-- 
Jouni Malinen                                            PGP id EFC895FA

<Prev in Thread] Current Thread [Next in Thread>