From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Karsten Wiese <annabellesgarden@yahoo.de>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH,RFC] quirks for VIA VT8237 southbridge
Date: Tue, 16 Aug 2005 09:49:10 -0600 [thread overview]
Message-ID: <200508160949.10607.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <200508161726.14149.annabellesgarden@yahoo.de>
On Tuesday 16 August 2005 9:26 am, Karsten Wiese wrote:
> What about the following version?
> quirk_via_686irq() only works on pci_devs that are part of the 686.
> Sooner or later there'll be more VIA southbridge types, which will
> not need quirk_via_irq() like the 8237.
Do you have VIA spec references to support this? I had a quick
look, but couldn't find anything specific about which VIA devices
need the quirk and which don't.
As I understand it, you're not making a functional change here,
only getting rid of some messages in the log. If that's true,
I'm hesitant about making more changes without information from
VIA.
> > ------
> /*
> * Via 686A/B: The PCI_INTERRUPT_LINE register for the on-chip
> * devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature:
> * when written, it makes an internal connection to the PIC.
> * For these devices, this register is defined to be 4 bits wide.
> * Normally this is fine. However for IO-APIC motherboards, or
> * non-x86 architectures (yes Via exists on PPC among other places),
> * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
> * interrupts delivered properly.
> */
> static void quirk_via_686irq(struct pci_dev *dev)
> {
> u8 irq, new_irq;
> /*
> * The ISA bridge is used to identify the 686.
> * It shares it's PCI slot and bus with the device under test
> * and is assigned to function 0.
> */
> unsigned int isa_bridge_devfn = PCI_DEVFN(PCI_SLOT(dev->devfn), 0);
> struct pci_dev * isa_bridge = pci_find_slot(dev->bus->number, isa_bridge_devfn);
>
> if (isa_bridge == NULL || isa_bridge->vendor != PCI_VENDOR_ID_VIA ||
> isa_bridge->device != PCI_DEVICE_ID_VIA_82C686)
> return; /* We are not on a 686. Lets leave */
>
> 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_1, quirk_via_686irq);
> DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_686irq);
> DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_686irq);
> DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_686irq);
> DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_6, quirk_via_686irq);
next prev parent reply other threads:[~2005-08-16 15:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-13 15:10 Karsten Wiese
2005-08-13 16:04 ` Grant Coady
2005-08-13 16:34 ` Karsten Wiese
2005-08-13 16:41 ` Jeff Garzik
2005-08-13 21:06 ` Grant Coady
2005-08-15 22:31 ` Bjorn Helgaas
2005-08-16 15:26 ` Karsten Wiese
2005-08-16 15:49 ` Bjorn Helgaas [this message]
2005-08-16 17:20 ` Alan Cox
2005-08-18 12:36 ` Karsten Wiese
2005-08-18 13:57 ` Alan Cox
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=200508160949.10607.bjorn.helgaas@hp.com \
--to=bjorn.helgaas@hp.com \
--cc=annabellesgarden@yahoo.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®