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; 19+ 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] 19+ messages in thread
* RE: [patch] VAIO irq assignment fix
@ 2002-01-18  0:01 Grover, Andrew
  0 siblings, 0 replies; 19+ messages in thread
From: Grover, Andrew @ 2002-01-18  0:01 UTC (permalink / raw)
  To: 'Dave Jones', Linus Torvalds
  Cc: Jes Sorensen, Kai Germaschewski, Alan Cox, linux-kernel,
	Marcelo Tosatti

> From: Dave Jones [mailto:davej@suse.de]
>  I was under the impression that the Intel ACPI folks had things in
>  mind for acpitable.c along the lines of 'rm', in favour of having 
>  their new interpretor do a "Load, setup, get the hell out" approach
>  for those that didn't want it staying around.

acpitable.c was written to support machines with a bad MPS table but a valid
$PIR. The 20011218 ACPI patch more closely integrates that code with the
rest, but the ability to get at the MADT (the ACPI MPS replacement table)
and other tables without the interpreter is still supported. The code is
under drivers/acpi, though.

I don't see that option going away any time soon.

However, without a valid $PIR (which is what is becoming more common and is
the Sony's problem) you need the interpreter, like Kai mentioned. We are
working to incorporate Kai's code into the next acpi patch, which will
evaluate and use _PRT properly. In fact, that's just what I was working on
this afternoon, so Real Soon Now. ;-)

Regards -- Andy

^ permalink raw reply	[flat|nested] 19+ messages in thread
[parent not found: <fa.gd40p7v.187cd9o@ifi.uio.no>]

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

Thread overview: 19+ 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
  -- strict thread matches above, loose matches on Subject: below --
2002-01-18  0:01 [patch] VAIO irq assignment fix Grover, Andrew
     [not found] <fa.gd40p7v.187cd9o@ifi.uio.no>
     [not found] ` <fa.fhsq5hv.1q2eri1@ifi.uio.no>
2002-01-21 20:06   ` Manfred Spraul

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