lkml.org 
[lkml]   [2006]   [Mar]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 5 Mar 2006 14:34:22 -0500
FromDave Jones <>
SubjectRe: [PATCH 001/001] PCI: PCI quirk for Asus A8V and A8V Deluxe motherboards
On Sun, Mar 05, 2006 at 08:27:09PM +0100, bjd wrote:

 > +static void __init asus_hides_ac97_lpc(struct pci_dev *dev)
 > +{
 > +	u8 val;
 > +	int asus_hides_ac97 = 0;
 > +
 > +	if (likely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) {
 > +		if (dev->device == PCI_DEVICE_ID_VIA_8237)
 > +			asus_hides_ac97 = 1;
 > +	}
 > +
 > +	if (!asus_hides_ac97)
 > +		return;

Why likely ?  It's just as unlikely to be an ASUS.
Also, why not just ..

	if (dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK)
		return;
	if (dev->device != PCI_DEVICE_ID_VIA_8237)
		return;
and lose the asus_hides_ac97 var completely?

Is this true of every ASUS board that has an 8237 ?
Does it actually remove the enable/disable ac97 feature from the BIOS,
or just reset it to disabled ?

 > +	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: onboard AC97/MC97 devices continue to
 > play 'hide and seek'! 0x%x\n", val);

How often does this trigger ?
The message could be a little more end-user friendly too
"Failed to enable onboard AC97/MC97 devices"

		Dave

-- 
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-06 12:11    [from the cache]
©2003-2008