|
|
2a1b01 |
From a8419e965891901217756254e0ed1a3351b2a3cb Mon Sep 17 00:00:00 2001
|
|
|
2a1b01 |
From: Ido Schimmel <idosch@nvidia.com>
|
|
|
2a1b01 |
Date: Tue, 12 Oct 2021 16:25:16 +0300
|
|
|
2a1b01 |
Subject: [PATCH 17/35] sff-8636: Rename SFF-8636 parsing functions
|
|
|
2a1b01 |
|
|
|
2a1b01 |
Currently, there are two SFF-8636 parsing functions. sff8636_show_all()
|
|
|
2a1b01 |
and sff8636_show_all_paged(). The former is called from the IOCTL path
|
|
|
2a1b01 |
with a buffer containing EEPROM contents and the latter is called from
|
|
|
2a1b01 |
the netlink path with pointer to individual EEPROM pages.
|
|
|
2a1b01 |
|
|
|
2a1b01 |
Rename them with '_ioctl' and '_nl' suffixes to make the distinction
|
|
|
2a1b01 |
clear.
|
|
|
2a1b01 |
|
|
|
2a1b01 |
In subsequent patches, these two functions will only differ in the way
|
|
|
2a1b01 |
they initialize the SFF-8636 memory map for parsing, while the parsing
|
|
|
2a1b01 |
code itself will be shared between the two.
|
|
|
2a1b01 |
|
|
|
2a1b01 |
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
|
|
|
2a1b01 |
---
|
|
|
2a1b01 |
ethtool.c | 4 ++--
|
|
|
2a1b01 |
internal.h | 6 +++---
|
|
|
2a1b01 |
netlink/module-eeprom.c | 2 +-
|
|
|
2a1b01 |
qsfp.c | 6 +++---
|
|
|
2a1b01 |
4 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
2a1b01 |
|
|
|
2a1b01 |
diff --git a/ethtool.c b/ethtool.c
|
|
|
2a1b01 |
index 1b79e9f8d958..6c744ff84eb9 100644
|
|
|
2a1b01 |
--- a/ethtool.c
|
|
|
2a1b01 |
+++ b/ethtool.c
|
|
|
2a1b01 |
@@ -4908,8 +4908,8 @@ static int do_getmodule(struct cmd_context *ctx)
|
|
|
2a1b01 |
break;
|
|
|
2a1b01 |
case ETH_MODULE_SFF_8436:
|
|
|
2a1b01 |
case ETH_MODULE_SFF_8636:
|
|
|
2a1b01 |
- sff8636_show_all(eeprom->data,
|
|
|
2a1b01 |
- modinfo.eeprom_len);
|
|
|
2a1b01 |
+ sff8636_show_all_ioctl(eeprom->data,
|
|
|
2a1b01 |
+ modinfo.eeprom_len);
|
|
|
2a1b01 |
break;
|
|
|
2a1b01 |
#endif
|
|
|
2a1b01 |
default:
|
|
|
2a1b01 |
diff --git a/internal.h b/internal.h
|
|
|
2a1b01 |
index 33e619b3ac53..7ca6066d4e12 100644
|
|
|
2a1b01 |
--- a/internal.h
|
|
|
2a1b01 |
+++ b/internal.h
|
|
|
2a1b01 |
@@ -390,9 +390,9 @@ void sff8079_show_all(const __u8 *id);
|
|
|
2a1b01 |
void sff8472_show_all(const __u8 *id);
|
|
|
2a1b01 |
|
|
|
2a1b01 |
/* QSFP Optics diagnostics */
|
|
|
2a1b01 |
-void sff8636_show_all(const __u8 *id, __u32 eeprom_len);
|
|
|
2a1b01 |
-void sff8636_show_all_paged(const struct ethtool_module_eeprom *page_zero,
|
|
|
2a1b01 |
- const struct ethtool_module_eeprom *page_three);
|
|
|
2a1b01 |
+void sff8636_show_all_ioctl(const __u8 *id, __u32 eeprom_len);
|
|
|
2a1b01 |
+void sff8636_show_all_nl(const struct ethtool_module_eeprom *page_zero,
|
|
|
2a1b01 |
+ const struct ethtool_module_eeprom *page_three);
|
|
|
2a1b01 |
|
|
|
2a1b01 |
/* FUJITSU Extended Socket network device */
|
|
|
2a1b01 |
int fjes_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
|
|
2a1b01 |
diff --git a/netlink/module-eeprom.c b/netlink/module-eeprom.c
|
|
|
2a1b01 |
index fc4ef1a53aff..18b1abbe1252 100644
|
|
|
2a1b01 |
--- a/netlink/module-eeprom.c
|
|
|
2a1b01 |
+++ b/netlink/module-eeprom.c
|
|
|
2a1b01 |
@@ -328,7 +328,7 @@ static void decoder_print(void)
|
|
|
2a1b01 |
case SFF8024_ID_QSFP:
|
|
|
2a1b01 |
case SFF8024_ID_QSFP28:
|
|
|
2a1b01 |
case SFF8024_ID_QSFP_PLUS:
|
|
|
2a1b01 |
- sff8636_show_all_paged(page_zero, page_three);
|
|
|
2a1b01 |
+ sff8636_show_all_nl(page_zero, page_three);
|
|
|
2a1b01 |
break;
|
|
|
2a1b01 |
case SFF8024_ID_QSFP_DD:
|
|
|
2a1b01 |
case SFF8024_ID_DSFP:
|
|
|
2a1b01 |
diff --git a/qsfp.c b/qsfp.c
|
|
|
2a1b01 |
index 27fdd3bd1771..dc6407d3ef6f 100644
|
|
|
2a1b01 |
--- a/qsfp.c
|
|
|
2a1b01 |
+++ b/qsfp.c
|
|
|
2a1b01 |
@@ -853,7 +853,7 @@ static void sff8636_show_page_zero(const __u8 *id)
|
|
|
2a1b01 |
|
|
|
2a1b01 |
}
|
|
|
2a1b01 |
|
|
|
2a1b01 |
-void sff8636_show_all(const __u8 *id, __u32 eeprom_len)
|
|
|
2a1b01 |
+void sff8636_show_all_ioctl(const __u8 *id, __u32 eeprom_len)
|
|
|
2a1b01 |
{
|
|
|
2a1b01 |
if (id[SFF8636_ID_OFFSET] == SFF8024_ID_QSFP_DD) {
|
|
|
2a1b01 |
cmis_show_all_ioctl(id);
|
|
|
2a1b01 |
@@ -871,8 +871,8 @@ void sff8636_show_all(const __u8 *id, __u32 eeprom_len)
|
|
|
2a1b01 |
}
|
|
|
2a1b01 |
}
|
|
|
2a1b01 |
|
|
|
2a1b01 |
-void sff8636_show_all_paged(const struct ethtool_module_eeprom *page_zero,
|
|
|
2a1b01 |
- const struct ethtool_module_eeprom *page_three)
|
|
|
2a1b01 |
+void sff8636_show_all_nl(const struct ethtool_module_eeprom *page_zero,
|
|
|
2a1b01 |
+ const struct ethtool_module_eeprom *page_three)
|
|
|
2a1b01 |
{
|
|
|
2a1b01 |
sff8636_show_identifier(page_zero->data);
|
|
|
2a1b01 |
sff8636_show_page_zero(page_zero->data);
|
|
|
2a1b01 |
--
|
|
|
2a1b01 |
2.35.1
|
|
|
2a1b01 |
|