From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.98 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795872138; b=ZlSao5U2zT4PnT+k6RxJA+7bVtCyKMw3KBzlflbX3Vr966oLzLvzlVsjDq7P1TxqB1Lw VZsycK+0+/c4CzSfc2UYPe9TsJf2K2QvbdKPYHarGA9ojm0aYcCWKMBjXgiUMkLjbfLyL AKe7R16MJxoafJnt2WT913rBcifBZX+kkVz3xWymEcAwqpHOMb7AOx3SPy1bI58pX2UI8 LkdM5QgNqhlJ9YSVI36oX9hibI6Exd4I5MZtE+FbbiqEMS5qtIc0DqaLa3InJB0vgNcBK V+UI0g+QUlYmTrcGCPRKjLHtdPIbAXe+Pyrizw5VE629ssTskhorlslNxI5Nh3p1rqQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795872138; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=z1khg19QkCCyqLzNYVjT2EVG0Mtbv7VJZRkh5p6N1B0=; b=RU1ApPSeObtSgLU1GT3F8U/otnUuiIH2fpfDgYGYdOAWKPEs1JUI8DnYw2p2Fjm4XtBW y3aqJuOIv2059I7S5BlbE1DVlCG4XUM1n7znYPD12l6lI6LRlzIE5azAXgT4ubeUXWCH3 6MEknl2fwg4A5M9iXMUEae3Y1Egom7LQHTWaNCUZEjWVSL39N8fMsk1r7Z2ifPYXtMXdv K6VXh9nvyRrgHrx++iSP8IVWwf6yQ6g6SsimaRx5P5+lVfqXkc7uDLXKUJXR0Uplt60/v TZMAHDbjAFYuyTTF+/xrfN3B6yLgRjPzRE6abLNuadmiv85nanPf0Z6ImfIEWvOacPw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=WynxcguJ; arc=none smtp.remote-ip=91.218.175.98 Received: from mta0.migadu.com (out-98.mta0.migadu.com [91.218.175.98]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59CA7606A321 for ; Sat, 28 Nov 2026 13:22:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 59CA7606A321 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=WynxcguJ X-Envelope-To: netdev@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=M82Nr7hcoywqRnHAnnxXFMqTcqe+raJxUgzhxpyNeW8=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795872135; v=1; x=1796476935; b=WynxcguJRqPlJfaL8+JvdNs2w/0yW+1AGwUJp6h4fVkunhJVr+qQsk8a0LZMAcVbSrK+yJz1 8+kYGKb8EgegQU0+ap94FQHM4I0P2WmYnsXMhp5YJlKA4oSFtHe+KtajakkFOHIxI1HFViGt0fY aatbIv09Xe69awH7Ts8A8hwo= X-Envelope-To: netdev@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 9d5dd37800f29bbb; Sat, 28 Nov 2026 13:22:15 +0000 X-Mizu-Trace-ID: 9d5dd37800f29bbb X-Migadu-Flow: FLOW_OUT Message-ID: Date: Sat, 28 Nov 2026 13:22:14 +0000 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v6 2/6] ionic: report FEC off as a supported link mode To: Brett Creeley , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shannon Nelson Cc: netdev@vger.kernel.org, Simon Horman , "Nikhil P. Rao" , Eric Joyner , Breno Leitao , Arun Kumar Prakash References: <20261125-ionic-get-fec-stats-v6-0-1ab49c729c00@amd.com> <20261125-ionic-get-fec-stats-v6-2-1ab49c729c00@amd.com> Content-Language: en-US From: Vadim Fedorenko In-Reply-To: <20261125-ionic-get-fec-stats-v6-2-1ab49c729c00@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 25/11/2026 23:22, Brett Creeley wrote: > From: Eric Joyner > > ionic_get_link_ksettings() lists BaseR and RS as supported FEC modes but > never lists FEC off, although ionic_set_fecparam() accepts it. Add > FEC_NONE to the supported modes, and to the advertised modes when the > port is configured with FEC off. Read config.fec_type once for that > chain: firmware updates it by DMA, and with a read per comparison a > change between them could leave no FEC mode advertised. > > Firmware does not report which FEC modes a port supports: the port > identity has a field for them, but firmware leaves it unset. So the > list holds every mode an ionic device can use, and firmware rejects a > request for a mode the port cannot run. BaseR and RS are already > listed on every port this way. Off follows the same rule: some > devices' firmware rejects it, others accept it. > > Fixes: 4d03e00a2140 ("ionic: Add initial ethtool support") > Signed-off-by: Eric Joyner > Signed-off-by: Brett Creeley > --- > drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > index 29b9a8502b8e..16c6e4c9852e 100644 > --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c > @@ -149,6 +149,7 @@ static int ionic_get_link_ksettings(struct net_device *netdev, > struct ionic_lif *lif = netdev_priv(netdev); > struct ionic_dev *idev = &lif->ionic->idev; > int copper_seen = 0; > + u8 fec_type; > > ethtool_link_ksettings_zero_link_mode(ks, supported); > > @@ -298,11 +299,15 @@ static int ionic_get_link_ksettings(struct net_device *netdev, > > linkmode_copy(ks->link_modes.advertising, ks->link_modes.supported); > > + ethtool_link_ksettings_add_link_mode(ks, supported, FEC_NONE); > ethtool_link_ksettings_add_link_mode(ks, supported, FEC_BASER); > ethtool_link_ksettings_add_link_mode(ks, supported, FEC_RS); > - if (idev->port_info->config.fec_type == IONIC_PORT_FEC_TYPE_FC) > + fec_type = READ_ONCE(idev->port_info->config.fec_type); > + if (fec_type == IONIC_PORT_FEC_TYPE_NONE) > + ethtool_link_ksettings_add_link_mode(ks, advertising, FEC_NONE); > + else if (fec_type == IONIC_PORT_FEC_TYPE_FC) > ethtool_link_ksettings_add_link_mode(ks, advertising, FEC_BASER); > - else if (idev->port_info->config.fec_type == IONIC_PORT_FEC_TYPE_RS) > + else if (fec_type == IONIC_PORT_FEC_TYPE_RS) > ethtool_link_ksettings_add_link_mode(ks, advertising, FEC_RS); > > ethtool_link_ksettings_add_link_mode(ks, supported, FIBRE); > Reviewed-by: Vadim Fedorenko