mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Karsten Keil <kkeil@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>,
	Aleksey Gorelov <Aleksey_Gorelov@Phoenix.com>
Subject: [PATCH] bug in VIA PCI IRQ routing
Date: Mon, 23 May 2005 14:58:48 +0200	[thread overview]
Message-ID: <20050523125848.GA15227@pingi3.kke.suse.de> (raw)

Hi,

during certification of some systems with VIA 82C586_0 chipset
we found that the PCI IRQ routing of PIRQD line goes wrong and the system
will get stuck because of unacknowledged IRQs.
It seems that the special case for PIRQD (pirq 4) is not needed for all
VIA versions. With this patch, the IRQ routing on these systems works
again (It did work with older 2.4 kernel versions prior the PIRQD change)

diff -urN linux-2.6.12-rc4-git7.org/arch/i386/pci/irq.c linux-2.6.12-rc4-git7/arch/i386/pci/irq.c
--- linux-2.6.12-rc4-git7.org/arch/i386/pci/irq.c	2005-05-23 13:35:48.562759583 +0200
+++ linux-2.6.12-rc4-git7/arch/i386/pci/irq.c	2005-05-23 13:41:47.349473060 +0200
@@ -26,6 +26,7 @@
 
 static int broken_hp_bios_irq9;
 static int acer_tm360_irqrouting;
+static int via_pirq_patch_value = 5;
 
 static struct irq_routing_table *pirq_table;
 
@@ -217,12 +218,12 @@
  */
 static int pirq_via_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
 {
-	return read_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq);
+	return read_config_nybble(router, 0x55, pirq == 4 ? via_pirq_patch_value : pirq);
 }
 
 static int pirq_via_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
 {
-	write_config_nybble(router, 0x55, pirq == 4 ? 5 : pirq, irq);
+	write_config_nybble(router, 0x55, pirq == 4 ? via_pirq_patch_value : pirq, irq);
 	return 1;
 }
 
@@ -512,6 +513,7 @@
 	switch(device)
 	{
 		case PCI_DEVICE_ID_VIA_82C586_0:
+			via_pirq_patch_value = 4;
 		case PCI_DEVICE_ID_VIA_82C596:
 		case PCI_DEVICE_ID_VIA_82C686:
 		case PCI_DEVICE_ID_VIA_8231:

-- 
Karsten Keil
SuSE Labs
ISDN development

             reply	other threads:[~2005-05-23 12:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-23 12:58 Karsten Keil [this message]
2005-05-23 17:34 Aleksey Gorelov
2005-05-23 18:24 ` Ondrej Zary
2005-05-23 19:53 Aleksey Gorelov
2005-05-23 21:21 ` Karsten Keil
2005-05-24  7:29 ` Karsten Keil
2005-05-24 16:24 Aleksey Gorelov

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=20050523125848.GA15227@pingi3.kke.suse.de \
    --to=kkeil@suse.de \
    --cc=Aleksey_Gorelov@Phoenix.com \
    --cc=akpm@osdl.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

all inboxes | Powered by JetHome®