svn commit: r350891 - stable/11/sys/dev/bge
Andriy Gapon
avg at FreeBSD.org
Mon Aug 12 08:45:27 UTC 2019
Author: avg
Date: Mon Aug 12 08:45:26 2019
New Revision: 350891
URL: https://svnweb.freebsd.org/changeset/base/350891
Log:
MFC r350025: bge: check that the bus is a pci bus before using it as such
Modified:
stable/11/sys/dev/bge/if_bge.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/bge/if_bge.c
==============================================================================
--- stable/11/sys/dev/bge/if_bge.c Mon Aug 12 08:43:00 2019 (r350890)
+++ stable/11/sys/dev/bge/if_bge.c Mon Aug 12 08:45:26 2019 (r350891)
@@ -3243,6 +3243,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 &&
@@ -3254,8 +3256,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