summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2008-10-02 06:29:45 +0000
committerimp <imp@FreeBSD.org>2008-10-02 06:29:45 +0000
commit406379556ca2dc6135e79fff9aca24c6b835483e (patch)
tree7a21159ba07c2ab421dac6d66a50312ca34c6e5c
parent4ab86caef8057e65aed236da9de9ba7242f7f78d (diff)
downloadFreeBSD-src-406379556ca2dc6135e79fff9aca24c6b835483e.zip
FreeBSD-src-406379556ca2dc6135e79fff9aca24c6b835483e.tar.gz
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....
-rw-r--r--sys/dev/pccbb/pccbb_pci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c
index 149bfac..6f258e1 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);
}
OpenPOWER on IntegriCloud