svn commit: r350890 - stable/12/sys/dev/bge
Andriy Gapon
avg at FreeBSD.org
Mon Aug 12 08:43:01 UTC 2019
Author: avg
Date: Mon Aug 12 08:43:00 2019
New Revision: 350890
URL: https://svnweb.freebsd.org/changeset/base/350890
Log:
MFC r350025: bge: check that the bus is a pci bus before using it as such
Modified:
stable/12/sys/dev/bge/if_bge.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/dev/bge/if_bge.c
==============================================================================
--- stable/12/sys/dev/bge/if_bge.c Mon Aug 12 08:37:59 2019 (r350889)
+++ stable/12/sys/dev/bge/if_bge.c Mon Aug 12 08:43:00 2019 (r350890)
@@ -3251,6 +3251,8 @@ bge_mbox_reorder(struct bge_softc *sc)
bus = device_get_parent(dev);
if (device_get_devclass(dev) != pcib)
break;
+ if (device_get_devclass(bus) != pci)
+ break;
for (i = 0; i < nitems(mbox_reorder_lists); i++) {
if (pci_get_vendor(dev) ==
mbox_reorder_lists[i].vendor &&
@@ -3262,8 +3264,6 @@ bge_mbox_reorder(struct bge_softc *sc)
return (1);
}
}
- if (device_get_devclass(bus) != pci)
- break;
}
return (0);
}
More information about the svn-src-stable
mailing list