🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18167

Re: [PATCH net-next v4 2/6] ionic: report FEC off as a supported link mode

#18167
From: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 23:10
94 lines
11613 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] ionic_get_link_ksettings()
  (drivers/net/ethernet/pensando/ionic/ionic_ethtool.c) now sets…

--

ionic: report FEC off as a supported link mode

This patch adds FEC_NONE to the supported link modes that
ionic_get_link_ksettings() reports. It also adds FEC_NONE to the
advertised modes when the port is configured with FEC off. According to
the commit message, firmware does not report per-port FEC capabilities,
so every mode any ionic device can use is listed, and firmware rejects
the ones a given port cannot run.

> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> index 119ac720c0787..84378bef9fb8b 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> @@ -298,9 +298,16 @@ static int ionic_get_link_ksettings(struct net_device *netdev,
>  
>  	linkmode_copy(ks->link_modes.advertising, ks->link_modes.supported);
>  
> +	/* Firmware does not report which FEC modes a port supports, so list
> +	 * every mode an ionic device can use; firmware rejects a request for
> +	 * a mode the port cannot run.
> +	 */
> +	ethtool_link_ksettings_add_link_mode(ks, supported, FEC_NONE);

[Severity: Medium]
Is the claim in this comment accurate? The firmware ABI in ionic_if.h
seems to define a per-port list of supported FEC types:

drivers/net/ethernet/pensando/ionic/ionic_if.h:
 * @fec_type:       supported fec types
 ...
union ionic_port_identity {
	struct {
		...
		u8     fec_type[4];
		u8     pause_type[2];
		u8     loopback_mode[2];
		__le32 speeds[16];
		...

ionic_port_identify() in ionic_main.c already copies this structure into
ionic->ident.port with memcpy_fromio(). However, nothing in the driver
reads ident.port.fec_type[].

The commit message says AINIC firmware rejects FEC off. With this change,
ethtool on an AINIC port will show "None" as a supported FEC mode. A
request for FEC off then reaches firmware through ionic_set_fecparam():

	if (fec_type != lif->ionic->idev.port_info->config.fec_type) {
		mutex_lock(&lif->ionic->dev_cmd_lock);
		ionic_dev_cmd_port_fec(&lif->ionic->idev, fec_type);
		ret = ionic_dev_cmd_wait(lif->ionic, DEVCMD_TIMEOUT);

and the firmware error comes back to userspace.

If firmware fills identity.fec_type[], could the supported FEC set be
built from it instead of extending the hardcoded list?

If firmware does not fill it, should the comment say that the field
exists but is not populated? As written, the comment contradicts the
documented ABI.

There is also another way to tell the parts apart. The driver already
reads dev_info.asic_type in ionic_init_devinfo(), and
ionic_doorbell_wa() uses it for per-ASIC behaviour. Could asic_type be
used to leave FEC_NONE out on parts whose firmware rejects FEC off?

The later patches in this series do not appear to change this. At the
end of the series, FEC_NONE is still added to supported unconditionally,
and ident.port.fec_type[] is still never read.

>  	ethtool_link_ksettings_add_link_mode(ks, supported, FEC_BASER);
>  	ethtool_link_ksettings_add_link_mode(ks, supported, FEC_RS);

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116-ionic-get-fec-stats-v4-0-d25cae9f1e87%40amd.com
Technical Details
Message-ID: <179495702693.3136.14857089621112634448@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365687-linux-kernel-netdev=dewy.ru
References: <20261116-ionic-get-fec-stats-v4-2-d25cae9f1e87@amd.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365687-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v4 2/6] ionic: report FEC off as a supported link mode
Date: Tue, 17 Nov 2026 23:10:26 +0000
Organization: Usenet Network
Message-ID: <179495702693.3136.14857089621112634448@kernel.org>
References: <20261116-ionic-get-fec-stats-v4-2-d25cae9f1e87@amd.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2451484"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:27iaJSAEj42D4FxHPxVUhrhLR+I= sha256:gpCyDGbvIdJAccmwTII3Y1px74LTp8HwV2HYV4ueJt4=
	sha1:QYT1VBwV2Sd6r/XpxBsldLnr3ec= sha256:TWGTj+iyXHl5PfmWYPiEz5+sO/O4D4lrfPeR14Om71s=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id D9AE51150E1; Wed, 18 Nov 2026 02:10:47 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.4
X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id LcQKhiNYmOdB;
	Wed, 18 Nov 2026 02:10:43 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-365687-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 91AA81150E2; Wed, 18 Nov 2026 02:10:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 7928C2EE99; Tue, 17 Nov 2026 23:10:31 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794957029;
	b=FBbM5fO7W5v3FHnae+npQbENXNLiPPkIneD2y0caT+U0vKU1R9sFdT/SwWRoDRCXWfIN
	 L5abRUtdRKEvrTghl89wYgf9/OJe9kNa62mv12mg6XbL5GbrRDAkTb/meZGKo/ZjZthMw
	 BYkKddyiOdW3XIiDVysnUM/2NFQYDJIhjEMSCIRFCiIfaXCAvOQeV5liMev4k7Ikv01eH
	 rArGufAFCJPM3D/qndBHxRLw9PR1iwrqeaBi+M3J8t+iDF0Kq6BVu/Ui8FlzfTJ31s2za
	 w9ecZAWC5RByeqObW1+djv9pnE0LxaGMx1dMNt3AC4ywIVh1cg5pqyXru+PQrUk7NNQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794957029;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=p4wAMtyc4NmPtXqxnhc6l2Zk0FAnQB+s8aHnPAKAsfc=;
	b=igV3WZXRC3YEizZ+d9IoCdNeIEEenPUaR0vTaRvNqyPjW13Q2EgH7wtWbC8G5tjTKVzJ
	 EqnxL+3+QmLM5CrVF6aSVBjdYLvRBvG+ZZq2BBmeF8qAIm1rznwQcMWDXtqV5e3djpNEX
	 nHS1Y5ZO+wFtLurMm4CrTKcE1FdpdahLTGUvZsAecqI1n88MDbtSTaXn5dxngAxjGD9Zz
	 rBDihu7n56/XIGaBNgBt+EgaxDmseqBA4sY3XXd1ztFhj0DD1WuK/CUUoOAkuRyU6ljXl
	 vLEwrb1yj/MVAyJqCCOv5yZqAcvAdVV0b6iKs8SfSnJwFwWe1pwk2BlcXqFTWCXNpKQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BlTY4EUD;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 4DC2F606A332;
	Tue, 17 Nov 2026 23:10:29 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BlTY4EUD
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794957028;
	b=JMtvsrzpTAxBI/tJGvx1o5nudSFb/7XC+SqOL+S9jZByVSnlbqCpbB9xgcEk3XCWsVeg
	 iXMMRY+6WDdU0gru689SK3wdQjy/g2I80xblWZcSV7kPHppdm8X4/xo95F96tij3BPz8y
	 NxdTKwFuVNLZ9obF0iOu2zRQR4MeWE7QUtEMpsfjVYFTlbwUJicTbjc/YyxDT9B4hpZKR
	 pmtsTWy2HaHLgZp7j6dPHujRIXhkZ8LIC2WeHt0wTT3KgnBqa6zGWayfVRSk/9IC9zTAQ
	 VGuHjk7y6xY0CZuOtK1paF7K8PSs+3SWJtclMj2u88x7oF0ybz5QRw6S1u14yz89gew==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794957028;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=p4wAMtyc4NmPtXqxnhc6l2Zk0FAnQB+s8aHnPAKAsfc=;
	b=wNoKksdczTHgg6cRql7Zz56TzycigHNJIx1vMcrFTDiEKTOk9yRPVejlVQx06eU//OPp
	 PIheYTpycfj4+Iyfrh2B4gUzwpyNRmidurxWb52NAtNk47V4PbXtLLjwfQm3MG0Lq/yRG
	 G1NyHOxbRJeuxtvdTZB6Izw7n6IURNfli1JqTBj4sck0/qF+Xrgp4UaknVP7TRYMyJ4AI
	 ZuHodYURtGHSISTfwnTLNNRPIhfcaD5bsZg7kpufiveqvlOMR+vGYCfpbRV2dyieNqR8J
	 8ZhNxtcWFHIxUbNNatORuhePUTbTnD5BJ+TJJJEgll4pfnsDhEU4Ta/5zMtLlPlLPEQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BlTY4EUD;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68A8A606A31C
	for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 23:10:28 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62C461F000C4;
	Tue, 17 Nov 2026 23:10:27 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794957027;
	bh=p4wAMtyc4NmPtXqxnhc6l2Zk0FAnQB+s8aHnPAKAsfc=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=BlTY4EUDJaZrk2aPFLHI77CBDosDLFYL65OFHFR0zeVXDalLnIzmfCDvDTF7Jgoao
	 /p5KW1CGiEdRJh8GnBlbSM6cF5MfursdQZB1v80T5GQZiVTC2FYIkCIhJ1QSsCVx8i
	 W9n9Wprtxoid6xHPesTU+3eq9ZPMTKN8IOOlO5KH6ykEmDcSBMgaxYs3mtd7Weh6+O
	 1F+NPPHh+W9esyR4/nxsSiB5W+KAO3cudfIiMkaBDQGSFLFp6zAkP5bm7oYBfBJRbF
	 Nkn09t8DxGSgT3vXD2+P/99oaZiqaQAWki4K1H7mYjH9TTS0vDzT81Jh71dBmhiBAl
	 iXSQiJV8bnD3A==
X-Cc: netdev@vger.kernel.org, brett.creeley@amd.com, andrew+netdev@lunn.ch,
 davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
 vadim.fedorenko@linux.dev, nikhil.rao@amd.com, edumazet@kernel.org
X-In-Reply-To: <20261116-ionic-get-fec-stats-v4-2-d25cae9f1e87@amd.com>
X-sashiko-severity: Medium
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list