diff mbox series

[net-next] nfp: ethtool: supplement nfp link modes supported

Message ID 20230210095319.603867-1-simon.horman@corigine.com (mailing list archive)
State Accepted
Commit 170677fee45baa955b3f7c1f41e6031d1d1e2272
Delegated to: Netdev Maintainers
Headers show
Series [net-next] nfp: ethtool: supplement nfp link modes supported | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 4 maintainers not CCed: louis.peens@corigine.com fei.qin@corigine.com edumazet@google.com yinjun.zhang@corigine.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: line length of 81 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Simon Horman Feb. 10, 2023, 9:53 a.m. UTC
From: Yu Xiao <yu.xiao@corigine.com>

Add support for the following modes to the nfp driver:

	NFP_MEDIA_10GBASE_LR
	NFP_MEDIA_25GBASE_LR
	NFP_MEDIA_25GBASE_ER

These modes are supported by the hardware and,
support for them was recently added to firmware.

Signed-off-by: Yu Xiao <yu.xiao@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 12 ++++++++++++
 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h |  3 +++
 2 files changed, 15 insertions(+)

Comments

Leon Romanovsky Feb. 12, 2023, 6:30 p.m. UTC | #1
On Fri, Feb 10, 2023 at 10:53:19AM +0100, Simon Horman wrote:
> From: Yu Xiao <yu.xiao@corigine.com>
> 
> Add support for the following modes to the nfp driver:
> 
> 	NFP_MEDIA_10GBASE_LR
> 	NFP_MEDIA_25GBASE_LR
> 	NFP_MEDIA_25GBASE_ER
> 
> These modes are supported by the hardware and,
> support for them was recently added to firmware.

Is it backward compatible? Will it work if I run old FW?

Thanks
Yinjun Zhang Feb. 13, 2023, 1:23 a.m. UTC | #2
On Sun, 12 Feb 2023 20:30:09 +0200, Leon Romanovsky wrote:
> On Fri, Feb 10, 2023 at 10:53:19AM +0100, Simon Horman wrote:
> > From: Yu Xiao <yu.xiao@corigine.com>
> >
> > Add support for the following modes to the nfp driver:
> >
> > 	NFP_MEDIA_10GBASE_LR
> > 	NFP_MEDIA_25GBASE_LR
> > 	NFP_MEDIA_25GBASE_ER
> >
> > These modes are supported by the hardware and,
> > support for them was recently added to firmware.
> 
> Is it backward compatible? Will it work if I run old FW?

Yes. The new ones are appended, not inserted.

> 
> Thanks
Leon Romanovsky Feb. 13, 2023, 7:21 a.m. UTC | #3
On Fri, Feb 10, 2023 at 10:53:19AM +0100, Simon Horman wrote:
> From: Yu Xiao <yu.xiao@corigine.com>
> 
> Add support for the following modes to the nfp driver:
> 
> 	NFP_MEDIA_10GBASE_LR
> 	NFP_MEDIA_25GBASE_LR
> 	NFP_MEDIA_25GBASE_ER
> 
> These modes are supported by the hardware and,
> support for them was recently added to firmware.
> 
> Signed-off-by: Yu Xiao <yu.xiao@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>
> ---
>  drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 12 ++++++++++++
>  drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h |  3 +++
>  2 files changed, 15 insertions(+)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
patchwork-bot+netdevbpf@kernel.org Feb. 13, 2023, 9:50 a.m. UTC | #4
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 10 Feb 2023 10:53:19 +0100 you wrote:
> From: Yu Xiao <yu.xiao@corigine.com>
> 
> Add support for the following modes to the nfp driver:
> 
> 	NFP_MEDIA_10GBASE_LR
> 	NFP_MEDIA_25GBASE_LR
> 	NFP_MEDIA_25GBASE_ER
> 
> [...]

Here is the summary with links:
  - [net-next] nfp: ethtool: supplement nfp link modes supported
    https://git.kernel.org/netdev/net-next/c/170677fee45b

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
index 918319f965b3..dfedb52b7e70 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
@@ -313,6 +313,10 @@  static const struct nfp_eth_media_link_mode {
 		.ethtool_link_mode	= ETHTOOL_LINK_MODE_10000baseKR_Full_BIT,
 		.speed			= NFP_SPEED_10G,
 	},
+	[NFP_MEDIA_10GBASE_LR] = {
+		.ethtool_link_mode	= ETHTOOL_LINK_MODE_10000baseLR_Full_BIT,
+		.speed			= NFP_SPEED_10G,
+	},
 	[NFP_MEDIA_10GBASE_CX4] = {
 		.ethtool_link_mode	= ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT,
 		.speed			= NFP_SPEED_10G,
@@ -349,6 +353,14 @@  static const struct nfp_eth_media_link_mode {
 		.ethtool_link_mode	= ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
 		.speed			= NFP_SPEED_25G,
 	},
+	[NFP_MEDIA_25GBASE_LR] = {
+		.ethtool_link_mode	= ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
+		.speed			= NFP_SPEED_25G,
+	},
+	[NFP_MEDIA_25GBASE_ER] = {
+		.ethtool_link_mode	= ETHTOOL_LINK_MODE_25000baseSR_Full_BIT,
+		.speed			= NFP_SPEED_25G,
+	},
 	[NFP_MEDIA_40GBASE_CR4] = {
 		.ethtool_link_mode	= ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT,
 		.speed			= NFP_SPEED_40G,
diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h
index 8f5cab0032d0..781edc451bd4 100644
--- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h
+++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h
@@ -140,6 +140,9 @@  enum nfp_ethtool_link_mode_list {
 	NFP_MEDIA_100GBASE_CR4,
 	NFP_MEDIA_100GBASE_KP4,
 	NFP_MEDIA_100GBASE_CR10,
+	NFP_MEDIA_10GBASE_LR,
+	NFP_MEDIA_25GBASE_LR,
+	NFP_MEDIA_25GBASE_ER,
 	NFP_MEDIA_LINK_MODES_NUMBER
 };