* [PATCH] pci-irq.c fix
@ 2002-01-17 11:53 Dennis Fleurbaaij
0 siblings, 0 replies; only message in thread
From: Dennis Fleurbaaij @ 2002-01-17 11:53 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2739 bytes --]
Hello,
A small bug in the patch, hereby the fixed version.
diff -ur linux-werkt/Documentation/Configure.help
linux/Documentation/Configure.help
--- linux-werkt/Documentation/Configure.help Fri Jan 11 21:44:55 2002
+++ linux/Documentation/Configure.help Wed Jan 16 11:23:48 2002
@@ -3613,6 +3613,25 @@
"Bridge" is the name used for the hardware inside your computer that
PCMCIA cards are plugged into. If unsure, say N.
+Allow IRQ mask expantion
+CONFIG_BIGGER_IRQ_MASK
+ Say Y here if you see that some devices are using the same IRQ while
+ there are free IRQ's available. This mostly due to bad BIOSes and
+ can be fixed by selecting this option.
+
+ This will improve selection of IRQ's that are not correctly set
+ by the BIOS. There is however a very slight chance that your hardware
+ can't be set to an IRQ that it was not build/programmed for and will
+ therefor refuse service, this is however not very likely.
+
+ This also fixes crashes from TI Cardbus controllers on laptops amongst
+ other IRQ-related crashes/hangs.
+
+ It will allow devices to also choose between IRQ 5,8,9,10 and 11 no
+ matter what the BIOS says.
+
+ If unsure say N.
+
System V IPC
CONFIG_SYSVIPC
Inter Process Communication is a suite of library functions and
diff -ur linux-werkt/arch/i386/config.in linux/arch/i386/config.in
--- linux-werkt/arch/i386/config.in Fri Jan 11 21:44:20 2002
+++ linux/arch/i386/config.in Wed Jan 16 11:22:31 2002
@@ -250,6 +250,9 @@
define_bool CONFIG_HOTPLUG_PCI n
fi
+bool 'Enable bigger IRQ mask.' CONFIG_BIGGER_IRQ_MASK
+
+
bool 'System V IPC' CONFIG_SYSVIPC
bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
bool 'Sysctl support' CONFIG_SYSCTL
diff -ur linux-werkt/arch/i386/kernel/pci-irq.c
linux/arch/i386/kernel/pci-irq.c
--- linux-werkt/arch/i386/kernel/pci-irq.c Sat Jan 12 11:48:03 2002
+++ linux/arch/i386/kernel/pci-irq.c Wed Jan 16 11:24:56 2002
@@ -19,6 +19,8 @@
#include "pci-i386.h"
+#define IRQ_SAFE_MASK 0x1e60
+
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R'
<< 24))
#define PIRQ_VERSION 0x0100
@@ -571,6 +573,16 @@
*/
newirq = dev->irq;
if (!newirq && assign) {
+
+ /*
+ * This adds the IRQ's that are marked as safe, this in order
to prevent wierd
+ * BIOSes to set insane values for irq-masks. It's a
selectable option.
+ */
+ #ifdef CONFIG_BIGGER_IRQ_MASK
+ mask |= IRQ_SAFE_MASK;
+ DBG(" -> mask expanded with %04x to %04x", IRQ_SAFE_MASK,
mask);
+ #endif
+
for (i = 0; i < 16; i++) {
if (!(mask & (1 << i)))
continue;
--
Cheers,
Dennis Fleurbaaij
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2548 bytes --]
diff -ur linux-werkt/Documentation/Configure.help linux/Documentation/Configure.help
--- linux-werkt/Documentation/Configure.help Fri Jan 11 21:44:55 2002
+++ linux/Documentation/Configure.help Wed Jan 16 11:23:48 2002
@@ -3613,6 +3613,25 @@
"Bridge" is the name used for the hardware inside your computer that
PCMCIA cards are plugged into. If unsure, say N.
+Allow IRQ mask expantion
+CONFIG_BIGGER_IRQ_MASK
+ Say Y here if you see that some devices are using the same IRQ while
+ there are free IRQ's available. This mostly due to bad BIOSes and
+ can be fixed by selecting this option.
+
+ This will improve selection of IRQ's that are not correctly set
+ by the BIOS. There is however a very slight chance that your hardware
+ can't be set to an IRQ that it was not build/programmed for and will
+ therefor refuse service, this is however not very likely.
+
+ This also fixes crashes from TI Cardbus controllers on laptops amongst
+ other IRQ-related crashes/hangs.
+
+ It will allow devices to also choose between IRQ 5,8,9,10 and 11 no
+ matter what the BIOS says.
+
+ If unsure say N.
+
System V IPC
CONFIG_SYSVIPC
Inter Process Communication is a suite of library functions and
diff -ur linux-werkt/arch/i386/config.in linux/arch/i386/config.in
--- linux-werkt/arch/i386/config.in Fri Jan 11 21:44:20 2002
+++ linux/arch/i386/config.in Wed Jan 16 11:22:31 2002
@@ -250,6 +250,9 @@
define_bool CONFIG_HOTPLUG_PCI n
fi
+bool 'Enable bigger IRQ mask.' CONFIG_BIGGER_IRQ_MASK
+
+
bool 'System V IPC' CONFIG_SYSVIPC
bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
bool 'Sysctl support' CONFIG_SYSCTL
diff -ur linux-werkt/arch/i386/kernel/pci-irq.c linux/arch/i386/kernel/pci-irq.c
--- linux-werkt/arch/i386/kernel/pci-irq.c Sat Jan 12 11:48:03 2002
+++ linux/arch/i386/kernel/pci-irq.c Wed Jan 16 11:24:56 2002
@@ -19,6 +19,8 @@
#include "pci-i386.h"
+#define IRQ_SAFE_MASK 0x1e60
+
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
#define PIRQ_VERSION 0x0100
@@ -571,6 +573,16 @@
*/
newirq = dev->irq;
if (!newirq && assign) {
+
+ /*
+ * This adds the IRQ's that are marked as safe, this in order to prevent wierd
+ * BIOSes to set insane values for irq-masks. It's a selectable option.
+ */
+ #ifdef CONFIG_BIGGER_IRQ_MASK
+ mask |= IRQ_SAFE_MASK;
+ DBG(" -> mask expanded with %04x to %04x", IRQ_SAFE_MASK, mask);
+ #endif
+
for (i = 0; i < 16; i++) {
if (!(mask & (1 << i)))
continue;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-17 11:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-17 11:53 [PATCH] pci-irq.c fix Dennis Fleurbaaij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox