mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergio Monteiro Basto <sergio@sergiomb.no-ip.org>
To: linux-kernel@vger.kernel.org
Cc: Daniel Drake <dsd@gentoo.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Andrew Morton <akpm@osdl.org>, Chris Wedgwood <cw@f00f.org>,
	greg@kroah.com, jeff@garzik.org, harmon@ksu.edu
Subject: [PATCH] VIA IRQ quirk fixup only in XT_PIC mode take 1 was [PATCH] Add SATA device to VIA IRQ quirk fixup list
Date: Fri, 28 Jul 2006 02:55:01 +0100	[thread overview]
Message-ID: <1154051701.7668.23.camel@localhost.portugal> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2362 bytes --]

Hi , 
Ok here is my first try against 2.6.17, I like the solution , but I have
time to test it, because I have to build the kernel again, I test if
compiles. 
Just though that I should send this patch soon as possible.
Any feed-back is welcome !
Thanks, 
 

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Scott J. Harmon" <harmon@ksu.edu>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Chris Wedgwood <cw@f00f.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Sergio Monteiro Basto <sergio@sergiomb.no-ip.org>
---

 quirks.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

--- linux-2.6.17.orig/drivers/pci/quirks.c	2006-06-18 02:49:35.000000000 +0100
+++ linux-2.6.17/drivers/pci/quirks.c	2006-07-28 02:20:00.000000000 +0100
@@ -642,22 +653,18 @@ static void quirk_via_irq(struct pci_dev
 {
 	u8 irq, new_irq;
 
-	new_irq = dev->irq & 0xf;
-	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
-	if (new_irq != irq) {
-		printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n",
-			pci_name(dev), irq, new_irq);
-		udelay(15);	/* unknown if delay really needed */
-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
-	}
-}
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
+	if (!smp_found_config && !cpu_has_apic) {
+		new_irq = dev->irq & 0xf;
+		pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+		if (new_irq != irq) {
+			printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n",
+				pci_name(dev), irq, new_irq);
+			udelay(15);	/* unknown if delay really needed */
+			pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
+		}
+	}
+}
+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);
 
 /*
  * VIA VT82C598 has its device ID settable and many BIOSes



[-- Attachment #1.2: VIAIRQfixup_onlyonXT_PIC.patch --]
[-- Type: text/x-patch, Size: 1745 bytes --]

--- linux-2.6.17.orig/drivers/pci/quirks.c	2006-06-18 02:49:35.000000000 +0100
+++ linux-2.6.17/drivers/pci/quirks.c	2006-07-28 02:20:00.000000000 +0100
@@ -642,22 +653,18 @@ static void quirk_via_irq(struct pci_dev
 {
 	u8 irq, new_irq;
 
-	new_irq = dev->irq & 0xf;
-	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
-	if (new_irq != irq) {
-		printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n",
-			pci_name(dev), irq, new_irq);
-		udelay(15);	/* unknown if delay really needed */
-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
-	}
-}
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
-DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
+	if (!smp_found_config && !cpu_has_apic) {
+		new_irq = dev->irq & 0xf;
+		pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+		if (new_irq != irq) {
+			printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n",
+				pci_name(dev), irq, new_irq);
+			udelay(15);	/* unknown if delay really needed */
+			pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
+		}
+	}
+}
+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);
 
 /*
  * VIA VT82C598 has its device ID settable and many BIOSes

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2166 bytes --]

             reply	other threads:[~2006-07-28  1:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28  1:55 Sergio Monteiro Basto [this message]
2006-07-28  1:58 ` Sergio Monteiro Basto

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=1154051701.7668.23.camel@localhost.portugal \
    --to=sergio@sergiomb.no-ip.org \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=cw@f00f.org \
    --cc=dsd@gentoo.org \
    --cc=greg@kroah.com \
    --cc=harmon@ksu.edu \
    --cc=jeff@garzik.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome