Date: Mon, 12 Aug 2019 08:45:26 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r350891 - stable/11/sys/dev/bge Message-ID: <201908120845.x7C8jQss093634@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908120845.x7C8jQss093634>