linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@wildopensource.com>
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: [patch] VAIO irq assignment fix
Date: Wed, 16 Jan 2002 19:00:18 -0500	[thread overview]
Message-ID: <15430.5138.319243.798770@trained-monkey.org> (raw)

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
 	 */

         reply	other threads:[~2002-01-17  0:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-17 14:14 [patch] VAIO irq assignment fix Alan Cox
2002-01-17  0:00 ` Jes Sorensen [this message]
2002-01-17 14:05   ` Jes Sorensen
2002-01-17 14:07     ` Jes Sorensen
2002-01-17 14:18     ` Alan Cox
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
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

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=15430.5138.319243.798770@trained-monkey.org \
    --to=jes@wildopensource.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).