diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 63b44030352..5c15ff51df9 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4377,6 +4377,18 @@ iflib_device_probe(device_t dev) return (ENXIO); } +int +iflib_device_probe_vendor(device_t dev) +{ + int probe; + + probe = iflib_device_probe(dev); + if (probe == BUS_PROBE_DEFAULT) + return (BUS_PROBE_VENDOR); + else + return (probe); +} + static void iflib_reset_qvalues(if_ctx_t ctx) { diff --git a/sys/net/iflib.h b/sys/net/iflib.h index 156d318a102..77f69354765 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -399,6 +399,13 @@ int iflib_device_suspend(device_t); int iflib_device_resume(device_t); int iflib_device_shutdown(device_t); +/* + * Use this instead of iflib_device_probe if the driver should report + * BUS_PROBE_VENDOR instead of BUS_PROBE_DEFAULT. (For example, an out-of-tree + * driver based on iflib). + */ +int iflib_device_probe_vendor(device_t); + int iflib_device_iov_init(device_t, uint16_t, const nvlist_t *); void iflib_device_iov_uninit(device_t);