From: Chris Wedgwood <cw@f00f.org>
To: ocilent1 <ocilent1@gmail.com>
Cc: Lee Revell <rlrevell@joe-job.com>,
Con Kolivas <kernel@kolivas.org>,
ck@vds.kolivas.org, Hugo Vanwoerkom <rociobarroso@att.net.mx>,
linux list <linux-kernel@vger.kernel.org>,
dsd@gentoo.org
Subject: Re: sound skips on 2.6.16.17
Date: Tue, 18 Jul 2006 23:33:44 -0700 [thread overview]
Message-ID: <20060719063344.GA1677@tuatara.stupidest.org> (raw)
In-Reply-To: <200607191403.26174.ocilent1@gmail.com>
On Wed, Jul 19, 2006 at 02:03:25PM +0800, ocilent1 wrote:
> Hows progress on this bug? Don't suppose we have got an official fix
> for this somewhere on the horizon?
Daniel Drake posted this recently, I've not had a chance to look over
it in detail but it's probably the best tested suggestion thus far.
Does it work for you?
[PATCH] PCI quirk_via_irq behaviour change
The most recent VIA IRQ quirk changes have broken various VIA devices for
some users. We are not able to add these devices to the blacklist as they
are also available in PCI-card form, and running the quirk on these devices
brings us back to square one (running the VIA quirk on non-VIA boards where
the quirk is not needed).
This patch, based on suggestions from Sergey Vlasov, implements a scheme
similar to but more restrictive than the scheme we had in 2.6.16 and earlier.
It runs the quirk on all VIA hardware, but only if a VIA southbridge was
detected on the system.
There is still a downside to this patch: if the user inserts a VIA PCI card
into a VIA-based motherboard, the quirk will also run on the VIA PCI card.
This corner case is hard to avoid.
However, I think this patch should be applied because:
- The quirk won't run on Chris's non-VIA system, which was the cause of
change in the first place.
- Affected sata_via users will be able to boot again
- Nobody really has a full understanding of the problem and the issues,
so I think this "compromise solution" should be acceptable for now.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Index: linux/drivers/pci/quirks.c
===================================================================
--- linux.orig/drivers/pci/quirks.c
+++ linux/drivers/pci/quirks.c
@@ -648,10 +648,37 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_V
* Some of the on-chip devices are actually '586 devices' so they are
* listed here.
*/
+
+static int via_irq_fixup_needed = -1;
+
+/*
+ * As some VIA hardware is available in PCI-card form, we need to restrict
+ * this quirk to VIA PCI hardware built onto VIA-based motherboards only.
+ * We try to locate a VIA southbridge before deciding whether the quirk
+ * should be applied.
+ */
+static const struct pci_device_id via_irq_fixup_tbl[] = {
+ {
+ .vendor = PCI_VENDOR_ID_VIA,
+ .device = PCI_ANY_ID,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ .class = PCI_CLASS_BRIDGE_ISA << 8,
+ .class_mask = 0xffff00,
+ },
+ { 0, },
+};
+
static void quirk_via_irq(struct pci_dev *dev)
{
u8 irq, new_irq;
+ if (via_irq_fixup_needed == -1)
+ via_irq_fixup_needed = pci_dev_present(via_irq_fixup_tbl);
+
+ if (!via_irq_fixup_needed)
+ return;
+
new_irq = dev->irq & 0xf;
pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
if (new_irq != irq) {
@@ -661,13 +688,7 @@ static void quirk_via_irq(struct pci_dev
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);
+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);
/*
* VIA VT82C598 has its device ID settable and many BIOSes
next prev parent reply other threads:[~2006-07-19 6:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4487F942.3030601@att.net.mx>
[not found] ` <200606161115.53716.ocilent1@gmail.com>
[not found] ` <4493D24D.2010902@att.net.mx>
2006-06-17 11:29 ` Con Kolivas
2006-06-18 2:41 ` Chris Wedgwood
2006-06-18 4:04 ` ocilent1
2006-06-18 4:40 ` Chris Wedgwood
2006-06-18 4:49 ` ocilent1
2006-06-18 11:11 ` Hugo Vanwoerkom
2006-06-18 13:35 ` karsten wiese
2006-06-19 3:54 ` ocilent1
2006-06-19 21:24 ` Lee Revell
2006-06-19 21:50 ` Chris Wedgwood
2006-06-20 18:35 ` Lee Revell
2006-06-20 19:36 ` Chris Wedgwood
2006-06-24 14:08 ` Jacek J
2006-06-27 22:25 ` Lee Revell
2006-06-27 22:48 ` Chris Wedgwood
2006-07-07 16:33 ` Lee Revell
2006-07-07 17:00 ` Chris Wedgwood
2006-07-07 18:00 ` Lee Revell
2006-07-19 6:03 ` ocilent1
2006-07-19 6:33 ` Chris Wedgwood [this message]
2006-07-19 11:25 ` ocilent1
2006-07-19 13:47 ` Hugo Vanwoerkom
2006-07-19 13:51 ` ocilent1
2006-10-07 21:39 ` sound skips on 2.6.18-ck1 Hugo Vanwoerkom
2006-10-07 21:56 ` Hugo Vanwoerkom
2006-10-08 16:18 ` Hugo Vanwoerkom
2006-10-08 17:19 ` [ck] " Andreas Mohr
2006-10-08 17:33 ` Daniel Drake
2006-06-18 11:06 ` sound skips on 2.6.16.17 Hugo Vanwoerkom
2006-06-18 13:10 ` Sergey Vlasov
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=20060719063344.GA1677@tuatara.stupidest.org \
--to=cw@f00f.org \
--cc=ck@vds.kolivas.org \
--cc=dsd@gentoo.org \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ocilent1@gmail.com \
--cc=rlrevell@joe-job.com \
--cc=rociobarroso@att.net.mx \
/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®