|
|
2a1b01 |
From 48391fa16592b47d37ef63466111c751a10c3e56 Mon Sep 17 00:00:00 2001
|
|
|
2a1b01 |
From: Ido Schimmel <idosch@nvidia.com>
|
|
|
2a1b01 |
Date: Tue, 23 Nov 2021 19:41:02 +0200
|
|
|
2a1b01 |
Subject: [PATCH 34/35] sff-8636: Print Power set and Power override bits
|
|
|
2a1b01 |
|
|
|
2a1b01 |
Print the SFF-8636 Power set and Power override bits when dumping EEPROM
|
|
|
2a1b01 |
contents via the '-m' option. They can be used to understand low power
|
|
|
2a1b01 |
mode enforcement by the host.
|
|
|
2a1b01 |
|
|
|
2a1b01 |
The 'SFF8636_LOW_PWR_MODE' define is renamed to 'SFF8636_LOW_PWR_SET' to
|
|
|
2a1b01 |
reflect its naming in the standard for QSFP+/QSFP28.
|
|
|
2a1b01 |
|
|
|
2a1b01 |
Example output:
|
|
|
2a1b01 |
|
|
|
2a1b01 |
# ethtool -m swp13
|
|
|
2a1b01 |
Identifier : 0x11 (QSFP28)
|
|
|
2a1b01 |
...
|
|
|
2a1b01 |
Extended identifier description : 5.0W max. Power consumption, High Power Class (> 3.5 W) enabled
|
|
|
2a1b01 |
Power set : Off
|
|
|
2a1b01 |
Power override : On
|
|
|
2a1b01 |
...
|
|
|
2a1b01 |
Transmit avg optical power (Channel 1) : 0.7633 mW / -1.17 dBm
|
|
|
2a1b01 |
Transmit avg optical power (Channel 2) : 0.7649 mW / -1.16 dBm
|
|
|
2a1b01 |
Transmit avg optical power (Channel 3) : 0.7696 mW / -1.14 dBm
|
|
|
2a1b01 |
Transmit avg optical power (Channel 4) : 0.7739 mW / -1.11 dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 1) : 0.9240 mW / -0.34 dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 2) : 0.9129 mW / -0.40 dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 3) : 0.9194 mW / -0.36 dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 4) : 0.8708 mW / -0.60 dBm
|
|
|
2a1b01 |
|
|
|
2a1b01 |
# ethtool --set-module swp13 power-mode-policy auto
|
|
|
2a1b01 |
|
|
|
2a1b01 |
# ethtool -m swp13
|
|
|
2a1b01 |
Identifier : 0x11 (QSFP28)
|
|
|
2a1b01 |
...
|
|
|
2a1b01 |
Extended identifier description : 5.0W max. Power consumption, High Power Class (> 3.5 W) not enabled
|
|
|
2a1b01 |
Power set : On
|
|
|
2a1b01 |
Power override : On
|
|
|
2a1b01 |
...
|
|
|
2a1b01 |
Transmit avg optical power (Channel 1) : 0.0000 mW / -inf dBm
|
|
|
2a1b01 |
Transmit avg optical power (Channel 2) : 0.0000 mW / -inf dBm
|
|
|
2a1b01 |
Transmit avg optical power (Channel 3) : 0.0000 mW / -inf dBm
|
|
|
2a1b01 |
Transmit avg optical power (Channel 4) : 0.0000 mW / -inf dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 1) : 0.0000 mW / -inf dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 2) : 0.0000 mW / -inf dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 3) : 0.0000 mW / -inf dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 4) : 0.0000 mW / -inf dBm
|
|
|
2a1b01 |
|
|
|
2a1b01 |
# ethtool --set-module swp13 power-mode-policy high
|
|
|
2a1b01 |
|
|
|
2a1b01 |
# ethtool -m swp13
|
|
|
2a1b01 |
Identifier : 0x11 (QSFP28)
|
|
|
2a1b01 |
...
|
|
|
2a1b01 |
Extended identifier description : 5.0W max. Power consumption, High Power Class (> 3.5 W) enabled
|
|
|
2a1b01 |
Power set : Off
|
|
|
2a1b01 |
Power override : On
|
|
|
2a1b01 |
...
|
|
|
2a1b01 |
Transmit avg optical power (Channel 1) : 0.7733 mW / -1.12 dBm
|
|
|
2a1b01 |
Transmit avg optical power (Channel 2) : 0.7754 mW / -1.10 dBm
|
|
|
2a1b01 |
Transmit avg optical power (Channel 3) : 0.7885 mW / -1.03 dBm
|
|
|
2a1b01 |
Transmit avg optical power (Channel 4) : 0.7886 mW / -1.03 dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 1) : 0.9248 mW / -0.34 dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 2) : 0.9129 mW / -0.40 dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 3) : 0.9187 mW / -0.37 dBm
|
|
|
2a1b01 |
Rcvr signal avg optical power(Channel 4) : 0.8785 mW / -0.56 dBm
|
|
|
2a1b01 |
|
|
|
2a1b01 |
In the above example, the LPMode signal is ignored (Power override is
|
|
|
2a1b01 |
always on) and low power mode is controlled via software only.
|
|
|
2a1b01 |
|
|
|
2a1b01 |
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
|
|
|
2a1b01 |
---
|
|
|
2a1b01 |
qsfp.c | 6 ++++++
|
|
|
2a1b01 |
qsfp.h | 2 +-
|
|
|
2a1b01 |
2 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
2a1b01 |
|
|
|
2a1b01 |
diff --git a/qsfp.c b/qsfp.c
|
|
|
2a1b01 |
index b3c9e1516af9..57aac86bd5f6 100644
|
|
|
2a1b01 |
--- a/qsfp.c
|
|
|
2a1b01 |
+++ b/qsfp.c
|
|
|
2a1b01 |
@@ -268,6 +268,12 @@ static void sff8636_show_ext_identifier(const struct sff8636_memory_map *map)
|
|
|
2a1b01 |
printf(" High Power Class (> 3.5 W) enabled\n");
|
|
|
2a1b01 |
else
|
|
|
2a1b01 |
printf(" High Power Class (> 3.5 W) not enabled\n");
|
|
|
2a1b01 |
+ printf("\t%-41s : ", "Power set");
|
|
|
2a1b01 |
+ printf("%s\n", ONOFF(map->lower_memory[SFF8636_PWR_MODE_OFFSET] &
|
|
|
2a1b01 |
+ SFF8636_LOW_PWR_SET));
|
|
|
2a1b01 |
+ printf("\t%-41s : ", "Power override");
|
|
|
2a1b01 |
+ printf("%s\n", ONOFF(map->lower_memory[SFF8636_PWR_MODE_OFFSET] &
|
|
|
2a1b01 |
+ SFF8636_PWR_OVERRIDE));
|
|
|
2a1b01 |
}
|
|
|
2a1b01 |
|
|
|
2a1b01 |
static void sff8636_show_connector(const struct sff8636_memory_map *map)
|
|
|
2a1b01 |
diff --git a/qsfp.h b/qsfp.h
|
|
|
2a1b01 |
index 1d8f24b5cbc2..aabf09fdc623 100644
|
|
|
2a1b01 |
--- a/qsfp.h
|
|
|
2a1b01 |
+++ b/qsfp.h
|
|
|
2a1b01 |
@@ -180,7 +180,7 @@
|
|
|
2a1b01 |
|
|
|
2a1b01 |
#define SFF8636_PWR_MODE_OFFSET 0x5D
|
|
|
2a1b01 |
#define SFF8636_HIGH_PWR_ENABLE (1 << 2)
|
|
|
2a1b01 |
-#define SFF8636_LOW_PWR_MODE (1 << 1)
|
|
|
2a1b01 |
+#define SFF8636_LOW_PWR_SET (1 << 1)
|
|
|
2a1b01 |
#define SFF8636_PWR_OVERRIDE (1 << 0)
|
|
|
2a1b01 |
|
|
|
2a1b01 |
#define SFF8636_TX_APP_SELECT_4_OFFSET 0x5E
|
|
|
2a1b01 |
--
|
|
|
2a1b01 |
2.35.1
|
|
|
2a1b01 |
|