summaryrefslogtreecommitdiffstats
path: root/sys/dev/ichsmb/ichsmb_pci.c
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2009-12-03 08:11:20 +0000
committeravg <avg@FreeBSD.org>2009-12-03 08:11:20 +0000
commit3cb9e82d646d4d75b9d93dd39dc387aac8732e8c (patch)
treebe174efafd598d277fb6a7afac4712349a2f497c /sys/dev/ichsmb/ichsmb_pci.c
parentaf3c24e741af37f179b4ca3db5466727dc36c5c7 (diff)
downloadFreeBSD-src-3cb9e82d646d4d75b9d93dd39dc387aac8732e8c.zip
FreeBSD-src-3cb9e82d646d4d75b9d93dd39dc387aac8732e8c.tar.gz
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
Diffstat (limited to 'sys/dev/ichsmb/ichsmb_pci.c')
-rw-r--r--sys/dev/ichsmb/ichsmb_pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ichsmb/ichsmb_pci.c b/sys/dev/ichsmb/ichsmb_pci.c
index ee544b4..fd9a8cb 100644
--- a/sys/dev/ichsmb/ichsmb_pci.c
+++ b/sys/dev/ichsmb/ichsmb_pci.c
@@ -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);
OpenPOWER on IntegriCloud