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
This commit is contained in:
Andriy Gapon 2009-12-03 08:11:20 +00:00
parent d93b49b38c
commit 86439baac2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200053

View File

@ -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);