The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=ba7e8e8dcb318099abc6013c27b3e6d3196d4f39
commit ba7e8e8dcb318099abc6013c27b3e6d3196d4f39 Author: Kevin Bowling <[email protected]> AuthorDate: 2026-08-12 00:12:51 +0000 Commit: Kevin Bowling <[email protected]> CommitDate: 2026-08-26 00:26:14 +0000 iflib: Create led(4) devices When a driver implements ifdi_led_func, have the framework create its led(4) device after attach completes and the ifnet and context locks are released. PR: 246885 Reported by: jlduran Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D32389 (cherry picked from commit 6591a7f6919295f2ec2b463d1ae9554a8bbf6104) --- sys/net/iflib.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 87fc5254ef0c..ed6ce3de70de 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -5428,6 +5428,13 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct CTX_UNLOCK(ctx); IFNET_WUNLOCK(); + /* Create led(4) devices if the driver defined the method */ + kobj_desc = &ifdi_led_func_desc; + kobj_method = kobj_lookup_method(((kobj_t)ctx)->ops->cls, NULL, + kobj_desc); + if (kobj_method != &kobj_desc->deflt) + iflib_led_create(ctx); + return (0); fail_detach:
