mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 001/001] i386/pci: fix nibble permutation and add Cyrix 5530 IRQ router
@ 2006-11-24 10:44 Juergen Beisert
  2006-11-24 11:41 ` Alan
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Beisert @ 2006-11-24 10:44 UTC (permalink / raw)
  To: linux-kernel

From: Juergen Beisert <juergen.beisert@weihenstephan.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@weihenstephan.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;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-24 13:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-24 10:44 [PATCH 001/001] i386/pci: fix nibble permutation and add Cyrix 5530 IRQ router Juergen Beisert
2006-11-24 11:41 ` Alan
2006-11-24 13:09   ` Juergen Beisert
2006-11-24 13:35     ` Alan
2006-11-24 13:46       ` Juergen Beisert

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®