[Mellanox] Enhance QSFP-DD DOM information (#5776)
New driver support fetching additional pages from the cable EEPROM. There are additional information to parse now: RX/TX power, TX bias, TX fault and RX LOS. Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
This commit is contained in:
parent
1eaaf64ed2
commit
bec01ae3bb
@ -180,7 +180,7 @@ QSFP_DD_RX_POWER_OFFSET = 58
|
||||
QSFP_DD_RX_POWER_WIDTH = 16
|
||||
QSFP_DD_TX_POWER_OFFSET = 26
|
||||
QSFP_DD_TX_POWER_WIDTH = 16
|
||||
QSFP_DD_CHANNL_MON_OFFSET = 154
|
||||
QSFP_DD_CHANNL_MON_OFFSET = 26
|
||||
QSFP_DD_CHANNL_MON_WIDTH = 48
|
||||
QSFP_DD_CHANNL_DISABLE_STATUS_OFFSET = 86
|
||||
QSFP_DD_CHANNL_DISABLE_STATUS_WIDTH = 1
|
||||
@ -466,8 +466,7 @@ class SFP(SfpBase):
|
||||
self.dom_tx_power_supported = True
|
||||
self.dom_tx_bias_power_supported = True
|
||||
self.dom_thresholds_supported = True
|
||||
#currently set to False becasue Page 11h is not supported by FW
|
||||
self.dom_rx_tx_power_bias_supported = False
|
||||
self.dom_rx_tx_power_bias_supported = True
|
||||
else:
|
||||
self.dom_supported = False
|
||||
self.second_application_list = False
|
||||
@ -975,7 +974,8 @@ class SFP(SfpBase):
|
||||
|
||||
if self.dom_rx_tx_power_bias_supported:
|
||||
# page 11h
|
||||
dom_data_raw = self._read_eeprom_specific_bytes((QSFP_DD_CHANNL_MON_OFFSET), QSFP_DD_CHANNL_MON_WIDTH)
|
||||
offset = 512
|
||||
dom_data_raw = self._read_eeprom_specific_bytes(offset + QSFP_DD_CHANNL_MON_OFFSET, QSFP_DD_CHANNL_MON_WIDTH)
|
||||
if dom_data_raw is None:
|
||||
return transceiver_dom_info_dict
|
||||
dom_channel_monitor_data = sfpd_obj.parse_channel_monitor_params(dom_data_raw, 0)
|
||||
@ -1301,7 +1301,7 @@ class SFP(SfpBase):
|
||||
elif self.sfp_type == QSFP_DD_TYPE:
|
||||
# page 11h
|
||||
if self.dom_rx_tx_power_bias_supported:
|
||||
offset = 128
|
||||
offset = 512
|
||||
dom_channel_monitor_raw = self._read_eeprom_specific_bytes((offset + QSFP_DD_CHANNL_RX_LOS_STATUS_OFFSET), QSFP_DD_CHANNL_RX_LOS_STATUS_WIDTH)
|
||||
if dom_channel_monitor_raw is not None:
|
||||
rx_los_data = int(dom_channel_monitor_raw[0], 8)
|
||||
@ -1353,7 +1353,7 @@ class SFP(SfpBase):
|
||||
return None
|
||||
# page 11h
|
||||
if self.dom_rx_tx_power_bias_supported:
|
||||
offset = 128
|
||||
offset = 512
|
||||
dom_channel_monitor_raw = self._read_eeprom_specific_bytes((offset + QSFP_DD_CHANNL_TX_FAULT_STATUS_OFFSET), QSFP_DD_CHANNL_TX_FAULT_STATUS_WIDTH)
|
||||
if dom_channel_monitor_raw is not None:
|
||||
tx_fault_data = int(dom_channel_monitor_raw[0], 8)
|
||||
@ -1646,7 +1646,7 @@ class SFP(SfpBase):
|
||||
elif self.sfp_type == QSFP_DD_TYPE:
|
||||
# page 11h
|
||||
if self.dom_rx_tx_power_bias_supported:
|
||||
offset = 128
|
||||
offset = 512
|
||||
sfpd_obj = qsfp_dd_Dom()
|
||||
if sfpd_obj is None:
|
||||
return None
|
||||
@ -1723,7 +1723,7 @@ class SFP(SfpBase):
|
||||
elif self.sfp_type == QSFP_DD_TYPE:
|
||||
# page 11
|
||||
if self.dom_rx_tx_power_bias_supported:
|
||||
offset = 128
|
||||
offset = 512
|
||||
sfpd_obj = qsfp_dd_Dom()
|
||||
if sfpd_obj is None:
|
||||
return None
|
||||
@ -1801,7 +1801,7 @@ class SFP(SfpBase):
|
||||
return None
|
||||
# page 11
|
||||
if self.dom_rx_tx_power_bias_supported:
|
||||
offset = 128
|
||||
offset = 512
|
||||
sfpd_obj = qsfp_dd_Dom()
|
||||
if sfpd_obj is None:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user