From 6e31e5ebdef28b962e625bb59f837e4901006d96 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 2 Oct 2008 06:29:45 +0000 Subject: [PATCH] Don't forget to match on a CLASS of PCIC_BRIDGE as well as subclass PCIS_BRIDGE_CARDBUS. Otherwise, we may hit a few false positives.... --- sys/dev/pccbb/pccbb_pci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index 149bfacf179..6f258e13f84 100644 --- a/sys/dev/pccbb/pccbb_pci.c +++ b/sys/dev/pccbb/pccbb_pci.c @@ -229,6 +229,7 @@ cbb_pci_probe(device_t brdev) { const char *name; uint32_t progif; + uint32_t baseclass; uint32_t subclass; /* @@ -245,9 +246,11 @@ cbb_pci_probe(device_t brdev) * to date have progif 0 (the Yenta spec, and successors mandate * this). */ + baseclass = pci_get_class(brdev); subclass = pci_get_subclass(brdev); progif = pci_get_progif(brdev); - if (subclass == PCIS_BRIDGE_CARDBUS && progif == 0) { + if (baseclass == PCIC_BRIDGE && + subclass == PCIS_BRIDGE_CARDBUS && progif == 0) { device_set_desc(brdev, "PCI-CardBus Bridge"); return (BUS_PROBE_DEFAULT); }