From: Ido Schimmel <idosch@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: <mkubecek@suse.cz>, <is@datarespons.no>, <mlxsw@nvidia.com>,
Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH ethtool] ethtool: Fix SFF-8472 transceiver module identification
Date: Wed, 29 Nov 2023 17:06:12 +0200 [thread overview]
Message-ID: <20231129150612.334560-1-idosch@nvidia.com> (raw)
According to table 5-1 in SFF-8472 Rev. 12.4, the Identifier Values for
"GBIC" (01h) and "Module soldered to motherboard (ex: SFF)" (02h) are
supported by the specification in addition to the current one.
Therefore, adjust ethtool to invoke the SFF-8079 parser for them, which
will in turn invoke the SFF-8472 parser if the transceiver module
supports digital diagnostic monitoring.
Without this patch, the EEPROM contents of such transceiver modules will
be hex dumped instead of being parsed and printed in a human readable
format.
Fixes: 25b64c66f58d ("ethtool: Add netlink handler for getmodule (-m)")
Reported-by: Ivar Simensen <is@datarespons.no>
Closes: https://lore.kernel.org/netdev/AM0PR03MB5938EE1722EF2C75112B86F5B9B9A@AM0PR03MB5938.eurprd03.prod.outlook.com/
Tested-by: Ivar Simensen <is@datarespons.no>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
netlink/module-eeprom.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/netlink/module-eeprom.c b/netlink/module-eeprom.c
index 09ad58011d2a..fe02c5ab2b65 100644
--- a/netlink/module-eeprom.c
+++ b/netlink/module-eeprom.c
@@ -216,6 +216,8 @@ static int eeprom_parse(struct cmd_context *ctx)
switch (request.data[0]) {
#ifdef ETHTOOL_ENABLE_PRETTY_DUMP
+ case SFF8024_ID_GBIC:
+ case SFF8024_ID_SOLDERED_MODULE:
case SFF8024_ID_SFP:
return sff8079_show_all_nl(ctx);
case SFF8024_ID_QSFP:
--
2.40.1
reply other threads:[~2023-11-29 15:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231129150612.334560-1-idosch@nvidia.com \
--to=idosch@nvidia.com \
--cc=is@datarespons.no \
--cc=mkubecek@suse.cz \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).