After reset the driver enables three LED outputs by writing 1s to
the appropriate GPIO/LED configuration bits in the LED & GPIO
configuration register LED_GPIO_CFG.
The LED Select (LED_SEL) bit in LED_GPIO_CFG chooses between two LED
modes:
0: Speed, Link+Activity, Full Duplex
1: Speed, Link, Activity
If an EEPROM is present it provides default register settings. If no
EEPROM is present this bit defaults to zero.
Previously we wrote to all bits in the register, clearing LED_SEL. A
device with LED_SEL=1 in EEPROM would thus not have correct LEDs.
Now we read the current value of LED_GPIO_CFG and just set the three
required LED configuration bits.
Based on Linux commit 52a2f0608366 ("net: usb: smsc95xx: fix changing
LED_SEL bit value updated from EEPROM").Details
Details
- Reviewers
adrian gonzo - Commits
- rG10ceddaa94d5: smsc: Use read-modify-write to configure LEDs
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable