Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Vadim Fedorenko
Sat, 28 Nov 2026 13:22
Re: [PATCH net-next v6 2/6] ionic: report FEC off as a supported link mode
Author: Vadim Fedorenko
Date: Sat, 28 Nov 2026 13:22
Date: Sat, 28 Nov 2026 13:22
57 lines
11298 bytes
11298 bytes
On 25/11/2026 23:22, Brett Creeley wrote:
> From: Eric Joyner <eric.joyner@amd.com>
>
> 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 <eric.joyner@amd.com>
> Signed-off-by: Brett Creeley <brett.creeley@amd.com>
> ---
> 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 <vadim.fedorenko@linux.dev>
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