Commit 50332445 authored by Linus Torvalds's avatar Linus Torvalds

Stop SIS 96x chips from lying about themselves.

Some machines with the SIS 96x southbridge have it set up
to claim it is a SIS 503 chip. That breaks irq routing logic
among other things. Fix it properly by making everybody aware
of the duplicity.
parent a52c0c8d
...@@ -750,13 +750,35 @@ static void __init quirk_sis_96x_smbus(struct pci_dev *dev) ...@@ -750,13 +750,35 @@ static void __init quirk_sis_96x_smbus(struct pci_dev *dev)
* bridges pretend to be 85C503/5513 instead. In that case see if we * bridges pretend to be 85C503/5513 instead. In that case see if we
* spotted a compatible north bridge to make sure. * spotted a compatible north bridge to make sure.
* (pci_find_device doesn't work yet) * (pci_find_device doesn't work yet)
*
* We can also enable the sis96x bit in the discovery register..
*/ */
static int __devinitdata sis_96x_compatible = 0; static int __devinitdata sis_96x_compatible = 0;
#define SIS_DETECT_REGISTER 0x40
static void __init quirk_sis_503_smbus(struct pci_dev *dev) static void __init quirk_sis_503_smbus(struct pci_dev *dev)
{ {
if (sis_96x_compatible) u8 reg;
quirk_sis_96x_smbus(dev); u16 devid;
pci_read_config_byte(dev, SIS_DETECT_REGISTER, &reg);
pci_write_config_byte(dev, SIS_DETECT_REGISTER, reg | (1 << 6));
pci_read_config_word(dev, PCI_DEVICE_ID, &devid);
if ((devid & 0xfff0) != 0x0960) {
pci_write_config_byte(dev, SIS_DETECT_REGISTER, reg);
return;
}
/* Make people aware that we changed the config.. */
printk(KERN_WARNING "Uncovering SIS%x that hid as a SIS503 (compatible=%d)\n", devid, sis_96x_compatible);
/*
* Ok, it now shows up as a 96x.. The 96x quirks are after
* the 503 quirk in the quirk table, so they'll automatically
* run and enable things like the SMBus device
*/
dev->device = devid;
} }
static void __init quirk_sis_96x_compatible(struct pci_dev *dev) static void __init quirk_sis_96x_compatible(struct pci_dev *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment