public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Moshe Shemesh <moshe@nvidia•com>
To: "David S. Miller" <davem@davemloft•net>,
	Jakub Kicinski <kuba@kernel•org>, Andrew Lunn <andrew@lunn•ch>,
	Adrian Pop <pop.adrian61@gmail•com>,
	"Michal Kubecek" <mkubecek@suse•cz>
Cc: <netdev@vger•kernel.org>, Vladyslav Tarasiuk <vladyslavt@nvidia•com>
Subject: [PATCH net-next 4/8] net/mlx5: Add support for DSFP module EEPROM dumps
Date: Fri, 9 Apr 2021 11:06:37 +0300	[thread overview]
Message-ID: <1617955601-21055-5-git-send-email-moshe@nvidia.com> (raw)
In-Reply-To: <1617955601-21055-1-git-send-email-moshe@nvidia.com>

From: Vladyslav Tarasiuk <vladyslavt@nvidia•com>

Allow the driver to recognise DSFP transceiver module ID and therefore
allow its EEPROM dumps using ethtool.

Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia•com>
---
 drivers/net/ethernet/mellanox/mlx5/core/port.c | 2 ++
 include/linux/mlx5/port.h                      | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c b/drivers/net/ethernet/mellanox/mlx5/core/port.c
index 522a41f8f1e2..1ef2b6a848c1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/port.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c
@@ -454,6 +454,8 @@ int mlx5_query_module_eeprom_by_page(struct mlx5_core_dev *dev,
 		if (params->page > 3)
 			return -EINVAL;
 		break;
+	case MLX5_MODULE_ID_DSFP:
+		break;
 	default:
 		mlx5_core_err(dev, "Module ID not recognized: 0x%x\n", module_id);
 		return -EINVAL;
diff --git a/include/linux/mlx5/port.h b/include/linux/mlx5/port.h
index 58d56adb9842..77ea4f9c5265 100644
--- a/include/linux/mlx5/port.h
+++ b/include/linux/mlx5/port.h
@@ -45,6 +45,7 @@ enum mlx5_module_id {
 	MLX5_MODULE_ID_QSFP             = 0xC,
 	MLX5_MODULE_ID_QSFP_PLUS        = 0xD,
 	MLX5_MODULE_ID_QSFP28           = 0x11,
+	MLX5_MODULE_ID_DSFP		= 0x1B,
 };
 
 enum mlx5_an_status {
-- 
2.26.2


  parent reply	other threads:[~2021-04-09  8:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  8:06 [PATCH net-next 0/8] ethtool: Extend module EEPROM dump API Moshe Shemesh
2021-04-09  8:06 ` [PATCH net-next 1/8] ethtool: Allow network drivers to dump arbitrary EEPROM data Moshe Shemesh
2021-04-09  8:06 ` [PATCH net-next 2/8] net/mlx5: Refactor module EEPROM query Moshe Shemesh
2021-04-09  8:06 ` [PATCH net-next 3/8] net/mlx5: Implement get_module_eeprom_by_page() Moshe Shemesh
2021-04-09  8:06 ` Moshe Shemesh [this message]
2021-04-09  8:06 ` [PATCH net-next 5/8] net: ethtool: Export helpers for getting EEPROM info Moshe Shemesh
2021-04-09  8:06 ` [PATCH net-next 6/8] ethtool: Add fallback to get_module_eeprom from netlink command Moshe Shemesh
2021-04-09  8:06 ` [PATCH net-next 7/8] phy: sfp: add netlink SFP support to generic SFP code Moshe Shemesh
2021-04-09  8:06 ` [PATCH net-next 8/8] ethtool: wire in generic SFP module access Moshe Shemesh
2021-04-12  0:10 ` [PATCH net-next 0/8] ethtool: Extend module EEPROM dump API patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1617955601-21055-5-git-send-email-moshe@nvidia.com \
    --to=moshe@nvidia$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=kuba@kernel$(echo .)org \
    --cc=mkubecek@suse$(echo .)cz \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pop.adrian61@gmail$(echo .)com \
    --cc=vladyslavt@nvidia$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox