From 1843d33fb7dc064f3b3feae5f9ef75a40499dc6b Mon Sep 17 00:00:00 2001 From: Alexander Malysh Date: Wed, 30 Jul 2003 20:40:27 +0000 Subject: [PATCH] Fixed sis630 detection. We need ISA brigde and not the pci device supplied by pci-core. Tickets #1350 and #1351 should be closed. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1925 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/busses/i2c-sis630.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/kernel/busses/i2c-sis630.c b/kernel/busses/i2c-sis630.c index fa3c4523..dfc22c2d 100644 --- a/kernel/busses/i2c-sis630.c +++ b/kernel/busses/i2c-sis630.c @@ -321,8 +321,19 @@ u32 sis630_func(struct i2c_adapter *adapter) { I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_PROC_CALL; } -int sis630_setup(struct pci_dev *sis630_dev) { +int sis630_setup(struct pci_dev *dummy) { unsigned char b; + struct pci_dev *sis630_dev = NULL; + + /* + We need ISA brigde and not pci device passed in. + */ + if (!(sis630_dev = pci_find_device(PCI_VENDOR_ID_SI, + PCI_DEVICE_ID_SI_503, + sis630_dev))) { + printk(KERN_ERR "i2c-sis630.o: Error: Can't detect 85C503/5513 ISA bridge!\n"); + return -ENODEV; + } /* Enable ACPI first , so we can accsess reg 74-75 @@ -333,7 +344,8 @@ int sis630_setup(struct pci_dev *sis630_dev) { printk(KERN_ERR "i2c-sis630.o: Error: Can't read bios ctl reg\n"); return -ENODEV; } - /* if ACPI already anbled , do nothing */ + + /* if ACPI already enabled , do nothing */ if (!(b & 0x80) && PCIBIOS_SUCCESSFUL != pci_write_config_byte(sis630_dev,SIS630_BIOS_CTL_REG,b|0x80)) {