From: Dennis Fleurbaaij <dennis@core-lan.nl>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] pci-irq.c fix
Date: Thu, 17 Jan 2002 12:53:18 +0100 [thread overview]
Message-ID: <3C46BB2E.10901@core-lan.nl> (raw)
[-- 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;
reply other threads:[~2002-01-17 11:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C46BB2E.10901@core-lan.nl \
--to=dennis@core-lan.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.