From 5bac84909275f8dc4c1c0ba8b01565f58a5ee264 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 14 Nov 2008 18:09:19 +0000 Subject: Merge r183539 and r183558: Do match on class to avoid false positives, return BUS_GENERIC_PROBE for a generic match. Approved by: re@ --- sys/dev/pccbb/pccbb_pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c index 73a52b0d82cd..bf0b225491fa 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,11 +246,13 @@ 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); + return (BUS_PROBE_GENERIC); } return (ENXIO); } -- cgit v1.3