public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] VAIO irq assignment fix
@ 2002-01-17  0:00 Jes Sorensen
  2002-01-17 14:14 ` Alan Cox
  0 siblings, 1 reply; 17+ messages in thread
From: Jes Sorensen @ 2002-01-17  0:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds, Alan Cox, Marcelo Tosatti

Hi

I have gotten a Sony VAIO R505TL laptop which has a Richo RL5C574
Cardbus controller however the broken bios doesn't assign an irq to the
controller even though it is attached.

This patch solves the problem and makes cardbus insert/eject a lot more
stable for me.

Cheers,
Jes
--- ../linux-2.4.18-pre2/arch/i386/kernel/dmi_scan.c	Fri Dec 21 12:41:53 2001
+++ arch/i386/kernel/dmi_scan.c	Wed Jan 16 18:36:05 2002
@@ -5,6 +5,7 @@
 #include <linux/init.h>
 #include <linux/apm_bios.h>
 #include <linux/slab.h>
+#include <linux/pci.h>
 #include <asm/io.h>
 #include <linux/pm.h>
 #include <asm/keyboard.h>
@@ -416,6 +417,26 @@
 
 
 /*
+ * Work around broken Sony VAIO Notebooks which do not assign irqs
+ * to their Richo RL5C475 Cardbus controller, IRQ is 9.
+ */
+static __init int fix_broken_sony_bios_irq(struct dmi_blacklist *d)
+{
+	struct pci_dev *pdev = NULL;
+
+	pdev = pci_find_device(PCI_VENDOR_ID_RICOH,
+			       PCI_DEVICE_ID_RICOH_RL5C475, pdev);
+	if (pdev) {
+		pdev->irq = 9;
+		pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 9);
+		printk(KERN_INFO "%s detected - fixing missing/"
+		       "broken IRQ routing\n", d->ident);
+	}
+	return 0;
+}
+
+
+/*
  *	Simple "print if true" callback
  */
  
@@ -614,7 +635,13 @@
 			NO_MATCH, NO_MATCH
 			} },
 	 
-			
+	{ fix_broken_sony_bios_irq, "Sony VAIO R505TL Series Laptop", {
+			MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+			MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
+			MATCH(DMI_BIOS_VERSION, "R0202U1"),
+			NO_MATCH
+			} },
+
 	/*
 	 *	Generic per vendor APM settings
 	 */

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2002-01-22 18:04 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-17  0:00 [patch] VAIO irq assignment fix Jes Sorensen
2002-01-17 14:14 ` Alan Cox
2002-01-17 14:05   ` Jes Sorensen
2002-01-17 14:18     ` Alan Cox
2002-01-17 14:07       ` Jes Sorensen
2002-01-17 14:59     ` Kai Germaschewski
2002-01-17 15:18       ` Jes Sorensen
2002-01-17 15:22         ` Kai Germaschewski
2002-01-17 16:38           ` Jes Sorensen
2002-01-17 17:05             ` Dave Jones
2002-01-17 22:35               ` Linus Torvalds
2002-01-17 23:12                 ` Dave Jones
2002-01-18  0:29                   ` Ben Greear
2002-01-17 23:14                 ` Kai Germaschewski
2002-01-18  0:33                   ` Alan Cox
2002-01-21 19:00                     ` Lee Packham
2002-01-22 18:01                       ` [patch] VAIO irq assignment fix ->CompactFlash-pcmcia freeze root

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox