mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mru@inprovide.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 001/001] PCI: PCI quirk for Asus A8V and A8V Deluxe motherboards
Date: Sun, 19 Mar 2006 16:35:43 +0000	[thread overview]
Message-ID: <yw1xslpez928.fsf@agrajag.inprovide.com> (raw)
In-Reply-To: <dvjsa6$i92$1@sea.gmane.org>

Andras Mantia <amantia@kde.org> writes:

> Måns Rullgård wrote:
>
>> This is the interesting bit.  Curiously enough, it is exactly the same
>> as mine.  I can't see any reason why it shouldn't match on your board.
>> 
>> Try sticking some printk()s in there and find out what values are
>> actually seen.
>
> I found why it didn't work on my PC before. I wrote that I not only enabled
> for every PCI id, but removed the following check:
>
>       if (likely(!asus_hides_ac97))
>                 return;
>
> This was the bit which made it work. After putting some debugging
> information it turned out that asus_hides_ac97_lpc was called *before*
> asus_hides_ac97_device, so the asus_hides_ac97 remained 0 in that check.
>
> As far as I know this problem appears on all VT8237 boards (I found in
> several forums), I suggest to completely drop the asus_hides_ac97_device
> function and the above if clause.

Hmm, we seem to be using different patches.  Here's what I'm using:

--- drivers/pci/quirks.c.orig   2006-01-03 03:21:10.000000000 +0000
+++ drivers/pci/quirks.c        2006-03-19 16:34:02.021338158 +0000
@@ -1074,6 +1074,33 @@
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_963,          quirk_sis_96x_smbus );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,     PCI_DEVICE_ID_SI_LPC,          quirk_sis_96x_smbus );
 
+/*
+ * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
+ * and MC97 modem controller are disabled when a second PCI soundcard is
+ * present. This patch, tweaking the VT8237 ISA bridge, enables them.
+ * -- bjd
+ */
+static void __init asus_hides_ac97_lpc(struct pci_dev *dev)
+{
+       u8 val;
+
+       if (dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK)
+               return;
+       if (dev->device != PCI_DEVICE_ID_VIA_8237)
+               return;
+
+       pci_read_config_byte(dev, 0x50, &val);
+       if (val & 0xc0) {
+               pci_write_config_byte(dev, 0x50, val & (~0xc0));
+               pci_read_config_byte(dev, 0x50, &val);
+               if (val & 0xc0)
+                       printk(KERN_INFO "PCI: Failed to enable onboard AC97/MC97 devices: 0x%x\n", val);
+               else
+                       printk(KERN_INFO "PCI: enabled onboard AC97/MC97 devices\n");
+       }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,    PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_lpc );
+
 #ifdef CONFIG_X86_IO_APIC
 static void __init quirk_alder_ioapic(struct pci_dev *pdev)
 {


-- 
Måns Rullgård
mru@inprovide.com


  reply	other threads:[~2006-03-19 16:36 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-05 19:27 bjd
2006-03-05 19:34 ` Dave Jones
2006-03-05 20:32 ` Lee Revell
2006-03-06  9:34   ` Jan-Benedict Glaw
2006-03-05 21:24 ` Måns Rullgård
2006-03-11 19:49   ` Måns Rullgård
2006-03-17 10:38 ` Andras Mantia
2006-03-17 14:33   ` Jan-Benedict Glaw
2006-03-17 14:43     ` Andras Mantia
2006-03-17 14:49       ` Jan-Benedict Glaw
2006-03-17 18:18         ` Andras Mantia
2006-03-17 19:29           ` Måns Rullgård
2006-03-18 14:01             ` Andras Mantia
2006-03-18 14:23               ` Måns Rullgård
2006-03-18 15:00                 ` Andras Mantia
2006-03-18 15:58                   ` Måns Rullgård
2006-03-19 10:38                     ` Andras Mantia
2006-03-19 12:58                       ` Måns Rullgård
2006-03-19 15:11                         ` Andras Mantia
2006-03-19 16:35                           ` Måns Rullgård [this message]
2006-03-19 17:38                             ` Andras Mantia
2006-03-19 18:03                               ` Måns Rullgård
2006-03-19 18:18                                 ` Andras Mantia
2006-03-19 18:36                                   ` Måns Rullgård
2006-03-19 18:44                                     ` Andras Mantia
2006-03-17 19:15       ` Måns Rullgård
  -- strict thread matches above, loose matches on Subject: below --
2006-03-05 12:37 Bauke jan Douma
2006-02-12  2:22 bjd

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=yw1xslpez928.fsf@agrajag.inprovide.com \
    --to=mru@inprovide.com \
    --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®