From nobody Wed Mar 02 15:40:38 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F0B9819DB688 for ; Wed, 2 Mar 2022 15:40:50 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K7yxs657cz3KD4 for ; Wed, 2 Mar 2022 15:40:49 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1140:c3d:1839:8e4b:c6ef:27c5]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id ABD57721E2807; Wed, 2 Mar 2022 16:40:39 +0100 (CET) Content-Type: text/plain; charset=us-ascii List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\)) Subject: Re: em(4) does not autonegotiate when fixed media is set From: tuexen@freebsd.org In-Reply-To: <20220302103331.3a50e443@opal.com> Date: Wed, 2 Mar 2022 16:40:38 +0100 Cc: freebsd-net@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <20220302103331.3a50e443@opal.com> To: "J.R. Oldroyd" X-Mailer: Apple Mail (2.3693.60.0.1.1) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4K7yxs657cz3KD4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 193.175.24.27 is neither permitted nor denied by domain of tuexen@freebsd.org) smtp.mailfrom=tuexen@freebsd.org X-Spamd-Result: default: False [-2.70 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[tuexen]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_SPF_SOFTFAIL(0.00)[~all:c]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FROM_NO_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-net]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[193.175.24.27:from] X-ThisMailContainsUnwantedMimeParts: N > On 2. Mar 2022, at 16:33, J.R. Oldroyd wrote: > > An em(4) interface configured with fixed media/mediatype settings, as in: > ifconfig em0 media 100baseTX mediatype full-duplex > does not respond to autonegotiation from the switch it is connected to. > (Actually, it does for 1000base but not for 100base or 10base.) As a > result, the switch may end up with mis-matched configuration. > > Attached patch enables autonegotiation even when media settings are set > to fixed 100base or 10base. 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... Best regards Michael > > I am not sure if there should also be: > hw->phy.autoneg_wait_to_complete = FALSE; > for these 100base and 10base cases to handle the situation where the other > end isn't going to autonegotiate either. > > -jr > >