Jump to conversation
Unresolved conversations (1)
@KanjiMonster KanjiMonster Aug 24, 2023
Since most modes above 1G do no support half duplex, maybe it would make sense to warn here about setting an unsupported speed/duplex combination? And yes, the kernel happily accepts a mask with no speed enabled.
Outdated
system-linux.c
Resolved conversations (6)
@KanjiMonster KanjiMonster Aug 29, 2023
```suggestion return !!(mask[nr / 32] & (1U << (nr % 32))); ``` to avoid undefined behavior for `(nr % 32) == 31`.
Outdated
system-linux.c
dangowrt
@KanjiMonster KanjiMonster Aug 29, 2023
```suggestion mask[nr / 32] &= ~(1U << (nr % 32)); ``` to avoid undefined behavior for `(nr % 32) == 31`.
Outdated
system-linux.c
dangowrt
@KanjiMonster KanjiMonster Aug 29, 2023
```suggestion if (ecmd.req.speed != SPEED_UNKNOWN) { ```
Outdated
system-linux.c
dangowrt
@KanjiMonster KanjiMonster Aug 27, 2023
Since you are adding suppport for configuring flow control, you should also add reporting its setting / state to `system_if_dump_info()`.
Outdated
system-linux.c
dangowrt KanjiMonster
@KanjiMonster KanjiMonster Aug 27, 2023
I think you should pass `nwords` here to `system_add_link_modes()` and adhere it there so you don't accidentally read outside of the array bounds on older systems.
Outdated
system-linux.c
dangowrt
@KanjiMonster KanjiMonster Aug 24, 2023
This will break for the new [10base-T1S modes](https://github.com/torvalds/linux/commit/16178c8ef53dc9734302c4c07633696454579ee3): * 10baseT1S is in the order Full then Half * 10baseT1S_P2MP does not match at all (luckily? ;) * 10baseT1S_P2MP exists only in Half Duplex Not necessarily something that needs to be fixed/handled right now, but will be a future issue (once we move beyond 6.1).
make_ethtool_modes_h.sh
dangowrt KanjiMonster