svn commit: r184973 - in stable/7/sys: . dev/pccbb modules/cxgb
Warner Losh
imp at FreeBSD.org
Fri Nov 14 10:09:20 PST 2008
Author: imp
Date: Fri Nov 14 18:09:19 2008
New Revision: 184973
URL: http://svn.freebsd.org/changeset/base/184973
Log:
Merge r183539 and r183558: Do match on class to avoid false positives,
return BUS_GENERIC_PROBE for a generic match.
Approved by: re@
Modified:
stable/7/sys/ (props changed)
stable/7/sys/dev/pccbb/pccbb_pci.c
stable/7/sys/modules/cxgb/ (props changed)
Modified: stable/7/sys/dev/pccbb/pccbb_pci.c
==============================================================================
--- stable/7/sys/dev/pccbb/pccbb_pci.c Fri Nov 14 12:31:05 2008 (r184972)
+++ stable/7/sys/dev/pccbb/pccbb_pci.c Fri Nov 14 18:09:19 2008 (r184973)
@@ -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);
}
More information about the svn-src-stable-7
mailing list