Re: em(4) does not autonegotiate when fixed media is set

From: <tuexen_at_freebsd.org>
Date: Wed, 02 Mar 2022 17:45:09 UTC
> On 2. Mar 2022, at 18:04, J.R. Oldroyd <fbsd@opal.com> wrote:
> 
> On Wed, 2 Mar 2022 17:21:22 +0100 Lutz Donnerhacke <lutz@donnerhacke.de> wrote:
>> 
>> On Wed, Mar 02, 2022 at 04:40:38PM +0100, tuexen@freebsd.org wrote:
>>> Is that what is expected? When using the above command I would expect
>>> that 100MBit/sec is used, not that the card negotiates with the peer
>>> something else. But my expectations might be wrong...  
>> 
>> Negotation of a given subset is useful. Some devices do not work without
>> negotiation enabled, others refuse to work in this case. Standard requires
>> autonegotiation for 1000TX, recommends it for lower speeds (otherwise assume
>> half duplex). For 1000FX the situation is unclear, depends on the year the
>> device was manufactured ... Today autoneg is expected on all interfaces even
>> with a limited subset of capabilies.
>> 
> 
> The patch enables autonegotiation for just the configured setting, not full
> autonegotiation.  The intent is to let the other end know that we only have
> the one configured setting.
> 
> At present, the other end appears to be syncing to the 100baseTX speed but
> it does indeed appear to be choosing half-duplex, so the link does not work
> when the FreeBSD end has been configured for full-duplex.
> 
> The only thing I am not sure about is whether or not the wait_to_complete
> parameter should be cleared in this case.  I suspect it should be.  There
> is the case that the other end may not attempt any autonegotiation dialog
> either, and we do not want to hang waiting for it.  I am not able to test
> this situation, though.
OK, I see. Thanks a lot for the clarification.

Best regards
Michael
> 
> 	-jr