🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by netdev-bot+sashiko Tue, 17 Nov 2026 23:10
Re: [PATCH net-next v4 2/6] ionic: report FEC off as a supported link mode
#18167
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads