From: Shannon Nelson <shannon.nelson@amd.com>
To: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <brett.creeley@amd.com>, Shannon Nelson <shannon.nelson@amd.com>
Subject: [PATCH v2 net-next 3/3] ionic: add module eeprom channel data to ionic_if and ethtool
Date: Tue, 15 Apr 2025 16:13:16 -0700 [thread overview]
Message-ID: <20250415231317.40616-4-shannon.nelson@amd.com> (raw)
In-Reply-To: <20250415231317.40616-1-shannon.nelson@amd.com>
Make the CMIS module type's page 17 channel data available for
ethtool to request. As done previously, carve space for this
data from the port_info reserved space.
In the future, if additional pages are needed, a new firmware
AdminQ command will be added for accessing random pages.
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
---
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 3 +++
drivers/net/ethernet/pensando/ionic/ionic_if.h | 6 ++++--
2 files 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 0d2ef808237b..92f30ff2d631 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
@@ -999,6 +999,9 @@ static int ionic_get_module_eeprom_by_page(struct net_device *netdev,
case 2:
src = &idev->port_info->sprom_page2[page_data->offset - 128];
break;
+ case 17:
+ src = &idev->port_info->sprom_page17[page_data->offset - 128];
+ break;
default:
return -EOPNOTSUPP;
}
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/drivers/net/ethernet/pensando/ionic/ionic_if.h
index 23218208b711..f1ddbe9994a3 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_if.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic_if.h
@@ -2842,6 +2842,7 @@ union ionic_port_identity {
* @sprom_epage: Extended Transceiver sprom
* @sprom_page1: Extended Transceiver sprom, page 1
* @sprom_page2: Extended Transceiver sprom, page 2
+ * @sprom_page17: Extended Transceiver sprom, page 17
* @rsvd: reserved byte(s)
* @pb_stats: uplink pb drop stats
*/
@@ -2853,13 +2854,14 @@ struct ionic_port_info {
struct ionic_mgmt_port_stats mgmt_stats;
};
union {
- u8 sprom_epage[256];
+ u8 sprom_epage[384];
struct {
u8 sprom_page1[128];
u8 sprom_page2[128];
+ u8 sprom_page17[128];
};
};
- u8 rsvd[504];
+ u8 rsvd[376];
/* pb_stats must start at 2k offset */
struct ionic_port_pb_stats pb_stats;
--
2.17.1
next prev parent reply other threads:[~2025-04-15 23:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 23:13 [PATCH v2 net-next 0/3] ionic: support QSFP CMIS Shannon Nelson
2025-04-15 23:13 ` [PATCH v2 net-next 1/3] ionic: extend the QSFP module sprom for more pages Shannon Nelson
2025-04-21 10:54 ` Simon Horman
2025-04-15 23:13 ` [PATCH v2 net-next 2/3] ionic: support ethtool get_module_eeprom_by_page Shannon Nelson
2025-04-21 10:54 ` Simon Horman
2025-04-15 23:13 ` Shannon Nelson [this message]
2025-04-21 10:54 ` [PATCH v2 net-next 3/3] ionic: add module eeprom channel data to ionic_if and ethtool Simon Horman
2025-04-22 10:40 ` [PATCH v2 net-next 0/3] ionic: support QSFP CMIS 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=20250415231317.40616-4-shannon.nelson@amd.com \
--to=shannon.nelson@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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
all inboxes | Powered by JetHome®