Currently if an em(4) interface is set to a fixed media configuration, for 1000b, it will participate in auto-negotiation as required by IEEE 802.3-2018 Clause 37.
However, if set to fixed media configuration for 100b or 10b, it does NOT participate in auto-negotiation.
By my reading of Clauses 28 and 37, while auto-negotiation is optional for 100b and 10b, it is not prohibited and is, in fact, "highly recommended".
This patch enables auto-negotiation for fixed 100b and 10b media configuration, in a similar manner to that already performed for 1000b. I.e., the patch enables advertising of just the manually configured settings with the goal of allowing the remote end to match the manually configured settings if it has them available.
To be clear, this patch does NOT allow an em(4) interface that has been manually configured with specific media settings to respond to auto-negotiation by then configuring different parameters to those that were manually configured. The intent of this patch is to fully comply with the requirements of Clause 37, but for 100b and 10b.
The need for this has arisen on an em(4) link where the other end is under a different administrative control and is set to full auto-negotiation. Due to the cable length GigE is not working well. It is desired to set the em(4) end to "media 100baseTX mediatype full-duplex" which does work when both ends are configured that way. Currently, because em(4) does not participate in autoneg for this setting, the remote defaults to half-duplex - i.e., there's a duplex mismatch and things don't work. With this patch, em(4) would inform the remote that it has only 100baseTX full, the remote would match that and it will work.