lkml.org 
[lkml]   [2004]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectcciss updates for 2.6 [4 of 11]
Patch 4 of 11. Please apply in order.
This patch fixes a bug when sharing IRQs with another controller that
receives a lot of interrupts. Without this check we will panic the system
when unloading and reloading the driver. This is in 2.4.
Please consider this for inclusion. Tested against 2.6.2.
--------------------------------------------------------------------------------------
diff -burN lx261-p003/drivers/block/cciss.c lx261/drivers/block/cciss.c
--- lx261-p003/drivers/block/cciss.c 2004-01-21 16:31:59.000000000 -0600
+++ lx261/drivers/block/cciss.c 2004-01-21 17:02:06.000000000 -0600
@@ -1983,7 +1983,7 @@


/* Is this interrupt for us? */
- if ( h->access.intr_pending(h) == 0)
+ if (( h->access.intr_pending(h) == 0) || (h->interrupts_enabled == 0))
return IRQ_NONE;

/*
diff -burN lx261-p003/drivers/block/cciss.h lx261/drivers/block/cciss.h
--- lx261-p003/drivers/block/cciss.h 2004-01-21 15:53:59.000000000 -0600
+++ lx261/drivers/block/cciss.h 2004-01-21 16:59:34.000000000 -0600
@@ -48,7 +48,7 @@
unsigned long io_mem_length;
CfgTable_struct *cfgtable;
int intr;
-
+ int interrupts_enabled;
int max_commands;
int commands_outstanding;
int max_outstanding; /* Debug */
@@ -134,9 +134,11 @@
{
if (val)
{ /* Turn interrupts on */
+ h->interrupts_enabled = 1;
writel(0, h->vaddr + SA5_REPLY_INTR_MASK_OFFSET);
} else /* Turn them off */
{
+ h->interrupts_enabled = 0;
writel( SA5_INTR_OFF,
h->vaddr + SA5_REPLY_INTR_MASK_OFFSET);
}
@@ -150,9 +152,11 @@
{
if (val)
{ /* Turn interrupts on */
+ h->interrupts_enabled = 1;
writel(0, h->vaddr + SA5_REPLY_INTR_MASK_OFFSET);
} else /* Turn them off */
{
+ h->interrupts_enabled = 0;
writel( SA5B_INTR_OFF,
h->vaddr + SA5_REPLY_INTR_MASK_OFFSET);
}
Thanks,
mikem
mike.miller@hp.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:1.009 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site