Date: Mon, 12 Aug 2019 08:43:01 +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-12@freebsd.org Subject: svn commit: r350890 - stable/12/sys/dev/bge Message-ID: <201908120843.x7C8h18M093431@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908120843.x7C8h18M093431>