|
|
1f2507 |
From 0b45f392c6c92e9823d6332622d7a45e7a36365e Mon Sep 17 00:00:00 2001
|
|
|
1f2507 |
From: Ido Schimmel <idosch@nvidia.com>
|
|
|
1f2507 |
Date: Tue, 23 Nov 2021 19:41:01 +0200
|
|
|
1f2507 |
Subject: [PATCH 33/35] cmis: Print Module-Level Controls
|
|
|
1f2507 |
|
|
|
1f2507 |
Print the CMIS Module-Level Controls when dumping EEPROM contents via
|
|
|
1f2507 |
the '-m' option. It can be used to understand low power mode enforcement
|
|
|
1f2507 |
by the host.
|
|
|
1f2507 |
|
|
|
1f2507 |
Example output:
|
|
|
1f2507 |
|
|
|
1f2507 |
# ethtool -m swp11
|
|
|
1f2507 |
Identifier : 0x18 (QSFP-DD Double Density 8X Pluggable Transceiver (INF-8628))
|
|
|
1f2507 |
...
|
|
|
1f2507 |
Module State : 0x03 (ModuleReady)
|
|
|
1f2507 |
LowPwrAllowRequestHW : Off
|
|
|
1f2507 |
LowPwrRequestSW : Off
|
|
|
1f2507 |
...
|
|
|
1f2507 |
Transmit avg optical power (Channel 1) : 1.3222 mW / 1.21 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 2) : 1.2666 mW / 1.03 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 3) : 1.2860 mW / 1.09 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 4) : 1.2988 mW / 1.14 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 5) : 1.2828 mW / 1.08 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 6) : 1.2913 mW / 1.11 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 7) : 1.2636 mW / 1.02 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 8) : 1.3408 mW / 1.27 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 9) : 1.3222 mW / 1.21 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 10) : 1.2666 mW / 1.03 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 11) : 1.2860 mW / 1.09 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 12) : 1.2988 mW / 1.14 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 13) : 1.2828 mW / 1.08 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 14) : 1.2913 mW / 1.11 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 15) : 1.2636 mW / 1.02 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 16) : 1.3408 mW / 1.27 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 1) : 1.1351 mW / 0.55 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 2) : 1.1603 mW / 0.65 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 3) : 1.1529 mW / 0.62 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 4) : 1.1670 mW / 0.67 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 5) : 1.1759 mW / 0.70 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 6) : 1.1744 mW / 0.70 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 7) : 1.1188 mW / 0.49 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 8) : 1.1640 mW / 0.66 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 9) : 1.1351 mW / 0.55 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 10) : 1.1603 mW / 0.65 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 11) : 1.1529 mW / 0.62 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 12) : 1.1670 mW / 0.67 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 13) : 1.1759 mW / 0.70 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 14) : 1.1744 mW / 0.70 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 15) : 1.1188 mW / 0.49 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 16) : 1.1640 mW / 0.66 dBm
|
|
|
1f2507 |
|
|
|
1f2507 |
# ethtool --set-module swp11 power-mode-policy auto
|
|
|
1f2507 |
|
|
|
1f2507 |
# ethtool -m swp11
|
|
|
1f2507 |
Identifier : 0x18 (QSFP-DD Double Density 8X Pluggable Transceiver (INF-8628))
|
|
|
1f2507 |
...
|
|
|
1f2507 |
Module State : 0x01 (ModuleLowPwr)
|
|
|
1f2507 |
LowPwrAllowRequestHW : Off
|
|
|
1f2507 |
LowPwrRequestSW : On
|
|
|
1f2507 |
...
|
|
|
1f2507 |
Transmit avg optical power (Channel 1) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 2) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 3) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 4) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 5) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 6) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 7) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 8) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 9) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 10) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 11) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 12) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 13) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 14) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 15) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 16) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 1) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 2) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 3) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 4) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 5) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 6) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 7) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 8) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 9) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 10) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 11) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 12) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 13) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 14) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 15) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 16) : 0.0001 mW / -40.00 dBm
|
|
|
1f2507 |
|
|
|
1f2507 |
# ethtool --set-module swp11 power-mode-policy high
|
|
|
1f2507 |
|
|
|
1f2507 |
# ethtool -m swp11
|
|
|
1f2507 |
Identifier : 0x18 (QSFP-DD Double Density 8X Pluggable Transceiver (INF-8628))
|
|
|
1f2507 |
...
|
|
|
1f2507 |
Module State : 0x03 (ModuleReady)
|
|
|
1f2507 |
LowPwrAllowRequestHW : Off
|
|
|
1f2507 |
LowPwrRequestSW : Off
|
|
|
1f2507 |
...
|
|
|
1f2507 |
Transmit avg optical power (Channel 1) : 1.3690 mW / 1.36 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 2) : 1.3036 mW / 1.15 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 3) : 1.3358 mW / 1.26 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 4) : 1.3509 mW / 1.31 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 5) : 1.3193 mW / 1.20 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 6) : 1.3314 mW / 1.24 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 7) : 1.3042 mW / 1.15 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 8) : 1.3919 mW / 1.44 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 9) : 1.3690 mW / 1.36 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 10) : 1.3036 mW / 1.15 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 11) : 1.3358 mW / 1.26 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 12) : 1.3509 mW / 1.31 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 13) : 1.3193 mW / 1.20 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 14) : 1.3314 mW / 1.24 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 15) : 1.3042 mW / 1.15 dBm
|
|
|
1f2507 |
Transmit avg optical power (Channel 16) : 1.3919 mW / 1.44 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 1) : 1.1299 mW / 0.53 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 2) : 1.1566 mW / 0.63 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 3) : 1.1484 mW / 0.60 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 4) : 1.1655 mW / 0.67 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 5) : 1.1751 mW / 0.70 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 6) : 1.1595 mW / 0.64 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 7) : 1.1158 mW / 0.48 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 8) : 1.1595 mW / 0.64 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 9) : 1.1299 mW / 0.53 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 10) : 1.1566 mW / 0.63 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 11) : 1.1484 mW / 0.60 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 12) : 1.1655 mW / 0.67 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 13) : 1.1751 mW / 0.70 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 14) : 1.1595 mW / 0.64 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 15) : 1.1158 mW / 0.48 dBm
|
|
|
1f2507 |
Rcvr signal avg optical power (Channel 16) : 1.1595 mW / 0.64 dBm
|
|
|
1f2507 |
|
|
|
1f2507 |
In the above example, the LowPwrRequestHW signal is ignored and low
|
|
|
1f2507 |
power mode is controlled via software only.
|
|
|
1f2507 |
|
|
|
1f2507 |
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
|
|
|
1f2507 |
---
|
|
|
1f2507 |
cmis.c | 15 +++++++++++++++
|
|
|
1f2507 |
cmis.h | 5 +++++
|
|
|
1f2507 |
2 files changed, 20 insertions(+)
|
|
|
1f2507 |
|
|
|
1f2507 |
diff --git a/cmis.c b/cmis.c
|
|
|
1f2507 |
index a32cc9f8b1f6..d0b62728e998 100644
|
|
|
1f2507 |
--- a/cmis.c
|
|
|
1f2507 |
+++ b/cmis.c
|
|
|
1f2507 |
@@ -470,6 +470,20 @@ static void cmis_show_mod_fault_cause(const struct cmis_memory_map *map)
|
|
|
1f2507 |
}
|
|
|
1f2507 |
}
|
|
|
1f2507 |
|
|
|
1f2507 |
+/* Print the current Module-Level Controls. Relevant documents:
|
|
|
1f2507 |
+ * [1] CMIS Rev. 5, pag. 58, section 6.3.2.2, Table 6-12
|
|
|
1f2507 |
+ * [2] CMIS Rev. 5, pag. 111, section 8.2.6, Table 8-10
|
|
|
1f2507 |
+ */
|
|
|
1f2507 |
+static void cmis_show_mod_lvl_controls(const struct cmis_memory_map *map)
|
|
|
1f2507 |
+{
|
|
|
1f2507 |
+ printf("\t%-41s : ", "LowPwrAllowRequestHW");
|
|
|
1f2507 |
+ printf("%s\n", ONOFF(map->lower_memory[CMIS_MODULE_CONTROL_OFFSET] &
|
|
|
1f2507 |
+ CMIS_LOW_PWR_ALLOW_REQUEST_HW_MASK));
|
|
|
1f2507 |
+ printf("\t%-41s : ", "LowPwrRequestSW");
|
|
|
1f2507 |
+ printf("%s\n", ONOFF(map->lower_memory[CMIS_MODULE_CONTROL_OFFSET] &
|
|
|
1f2507 |
+ CMIS_LOW_PWR_REQUEST_SW_MASK));
|
|
|
1f2507 |
+}
|
|
|
1f2507 |
+
|
|
|
1f2507 |
static void cmis_parse_dom_power_type(const struct cmis_memory_map *map,
|
|
|
1f2507 |
struct sff_diags *sd)
|
|
|
1f2507 |
{
|
|
|
1f2507 |
@@ -845,6 +859,7 @@ static void cmis_show_all_common(const struct cmis_memory_map *map)
|
|
|
1f2507 |
cmis_show_rev_compliance(map);
|
|
|
1f2507 |
cmis_show_mod_state(map);
|
|
|
1f2507 |
cmis_show_mod_fault_cause(map);
|
|
|
1f2507 |
+ cmis_show_mod_lvl_controls(map);
|
|
|
1f2507 |
cmis_show_dom(map);
|
|
|
1f2507 |
}
|
|
|
1f2507 |
|
|
|
1f2507 |
diff --git a/cmis.h b/cmis.h
|
|
|
1f2507 |
index 2c67ad5640ab..46797081f13c 100644
|
|
|
1f2507 |
--- a/cmis.h
|
|
|
1f2507 |
+++ b/cmis.h
|
|
|
1f2507 |
@@ -36,6 +36,11 @@
|
|
|
1f2507 |
#define CMIS_CURR_TEMP_OFFSET 0x0E
|
|
|
1f2507 |
#define CMIS_CURR_VCC_OFFSET 0x10
|
|
|
1f2507 |
|
|
|
1f2507 |
+/* Module Global Controls (Page 0) */
|
|
|
1f2507 |
+#define CMIS_MODULE_CONTROL_OFFSET 0x1A
|
|
|
1f2507 |
+#define CMIS_LOW_PWR_ALLOW_REQUEST_HW_MASK 0x40
|
|
|
1f2507 |
+#define CMIS_LOW_PWR_REQUEST_SW_MASK 0x10
|
|
|
1f2507 |
+
|
|
|
1f2507 |
/* Module Fault Information (Page 0) */
|
|
|
1f2507 |
#define CMIS_MODULE_FAULT_OFFSET 0x29
|
|
|
1f2507 |
#define CMIS_MODULE_FAULT_NO_FAULT 0x00
|
|
|
1f2507 |
--
|
|
|
1f2507 |
2.35.1
|
|
|
1f2507 |
|