aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Bowling <kbowling@FreeBSD.org>2026-08-12 00:29:17 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2026-08-12 02:58:08 +0000
commit28f96cc3748fc46408cc6ab6172f09bc2182cad7 (patch)
treeb2b881b3de53d7d951728d758928cad7f4578847
parent19f75b38199b9d30e85fab83e61ff36b0b9ed015 (diff)
e1000: Identify SerDes adapters with LED blink
The generic LED on and off operations do not handle internal SerDes media, leaving the led(4) device ineffective on my I210 fiber port. Use the hardware blink operation for the on phase on internal SerDes. The off phase restores the saved OEM LED configuration as before. MFC after: 2 weeks
-rw-r--r--sys/dev/e1000/if_em.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 5a02514a89e3..66a298ecf21c 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -5517,7 +5517,10 @@ em_if_led_func(if_ctx_t ctx, int onoff)
if (onoff) {
e1000_setup_led(&sc->hw);
- e1000_led_on(&sc->hw);
+ if (sc->hw.phy.media_type == e1000_media_type_internal_serdes)
+ e1000_blink_led(&sc->hw);
+ else
+ e1000_led_on(&sc->hw);
} else {
e1000_led_off(&sc->hw);
e1000_cleanup_led(&sc->hw);