svn commit: r200053 - head/sys/dev/ichsmb
Andriy Gapon
avg at FreeBSD.org
Thu Dec 3 08:11:20 UTC 2009
Author: avg
Date: Thu Dec 3 08:11:20 2009
New Revision: 200053
URL: http://svn.freebsd.org/changeset/base/200053
Log:
ichsmb: try attaching only to intel hardware in the default case
Ideally we should attempt attaching only to known supported devices.
But I am not sure that we have all supported PCI IDs already listed,
and I am too young to die, err, I don't want to take the heat from
causing a trouble to someone.
MFC after: 1 week
X-ToDo: drop the default case
Modified:
head/sys/dev/ichsmb/ichsmb_pci.c
Modified: head/sys/dev/ichsmb/ichsmb_pci.c
==============================================================================
--- head/sys/dev/ichsmb/ichsmb_pci.c Thu Dec 3 08:01:29 2009 (r200052)
+++ head/sys/dev/ichsmb/ichsmb_pci.c Thu Dec 3 08:11:20 2009 (r200053)
@@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$");
#include <dev/ichsmb/ichsmb_reg.h>
/* PCI unique identifiers */
+#define VENDORID_INTEL 0x8086
#define ID_82801AA 0x24138086
#define ID_82801AB 0x24238086
#define ID_82801BA 0x24438086
@@ -171,10 +172,11 @@ ichsmb_pci_probe(device_t dev)
device_set_desc(dev, "Intel 631xESB/6321ESB (ESB2) SMBus controller");
break;
default:
- if (pci_get_class(dev) == PCIC_SERIALBUS
+ if (pci_get_vendor(dev) == VENDORID_INTEL
+ && pci_get_class(dev) == PCIC_SERIALBUS
&& pci_get_subclass(dev) == PCIS_SERIALBUS_SMBUS
&& pci_get_progif(dev) == PCIS_SERIALBUS_SMBUS_PROGIF) {
- device_set_desc(dev, "SMBus controller");
+ device_set_desc(dev, "Intel SMBus controller");
return (BUS_PROBE_DEFAULT); /* XXX */
}
return (ENXIO);
More information about the svn-src-head
mailing list