[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200611241144.06267.juergen127@kreuzholzen.de>
Date: Fri, 24 Nov 2006 11:44:05 +0100
From: Juergen Beisert <juergen127@...uzholzen.de>
To: linux-kernel@...r.kernel.org
Subject: [PATCH 001/001] i386/pci: fix nibble permutation and add Cyrix 5530 IRQ router
From: Juergen Beisert <juergen.beisert@...henstephan.org>
This patch adds CYRIX_5530_LEGACY to the list of known PCI interrupt router,
to setup chipset's routing register with valid data. It seems never be a
problem if the BIOS sets up these registers. But in the presence of LinuxBios
it fails for Cyrix 5530, due to LinuxBios does not setup these registers
(it leave it at their reset values).
I have no Cyrix 5520 to check, but as the comment in the source states the
Cyrix 5520 and Cyrix 5530 do interrupt routing in the same way. But the
(pirq-1)^1 expression to set a route always sets the wrong nibble, so
INTA/INTB and INTC/INTD are permuted and do not work as expected.
Signed-off-by: Juergen Beisert <juergen.beisert@...henstephan.org>
Index: arch/i386/pci/irq.c
===================================================================
--- arch/i386/pci/irq.c
+++ arch/i386/pci/irq.c
@@ -306,12 +306,12 @@ static int pirq_opti_set(struct pci_dev
*/
static int pirq_cyrix_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
{
- return read_config_nybble(router, 0x5C, (pirq-1)^1);
+ return read_config_nybble(router, 0x5C, pirq-1);
}
static int pirq_cyrix_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
{
- write_config_nybble(router, 0x5C, (pirq-1)^1, irq);
+ write_config_nybble(router, 0x5C, pirq-1, irq);
return 1;
}
@@ -642,6 +642,7 @@ static __init int cyrix_router_probe(str
{
switch(device)
{
+ case PCI_DEVICE_ID_CYRIX_5530_LEGACY:
case PCI_DEVICE_ID_CYRIX_5520:
r->name = "NatSemi";
r->get = pirq_cyrix_get;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists