Search Linux Wireless

Re: Mark IPW2100 as BROKEN: Fatal interrupt. Scheduling firmware restart.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 21, 2008 at 12:43:32PM -0700, Arjan van de Ven (arjan@xxxxxxxxxxxxx) wrote:
> > @@ -3174,6 +3176,10 @@ static void ipw2100_irq_tasklet(struct
> > ipw2100_priv *priv) if (inta & IPW2100_INTA_FATAL_ERROR) {
> >  		printk(KERN_WARNING DRV_NAME
> >  		       ": Fatal interrupt. Scheduling firmware
> > restart.\n");
> > +		WARN_ON(1);
> > +
> > +		BUG_ON(ipw2100_max_fatal_ints-- <= 0);
> 
> BUG_ON in interrupt context is just extremely hostile, since it means
> the box is dead.
>
> also I would suggest using WARN_ON_ONCE() 

Well, I actually wanted to have a bug there because of it, but now I
think that annoying repeated warning is enough to bring attention to the
problem by putting bug information into some magic special place called
kerneloops collection.

Consider for inclusing for the upcoming kernel to get wider
notifications. Yes, it is not a bugfix, I know.

diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 19a401c..6599211 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -206,6 +206,9 @@ MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])");
 
 static u32 ipw2100_debug_level = IPW_DL_NONE;
 
+static int ipw2100_max_fatal_ints = 10;
+module_param(ipw2100_max_fatal_ints, int, 0644);
+
 #ifdef CONFIG_IPW2100_DEBUG
 #define IPW_DEBUG(level, message...) \
 do { \
@@ -3174,6 +3177,9 @@ static void ipw2100_irq_tasklet(struct ipw2100_priv *priv)
 	if (inta & IPW2100_INTA_FATAL_ERROR) {
 		printk(KERN_WARNING DRV_NAME
 		       ": Fatal interrupt. Scheduling firmware restart.\n");
+
+		WARN_ON(ipw2100_max_fatal_ints-- >= 0);
+
 		priv->inta_other++;
 		write_register(dev, IPW_REG_INTA, IPW2100_INTA_FATAL_ERROR);
 


-- 
	Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux