Skip to content

Commit

Permalink
DellEMC: Z9332f fix platform bugs (#8777)
Browse files Browse the repository at this point in the history
* DellEMC: Z9332f fix platform bugs

* update sfp.py
  • Loading branch information
aravindmani-1 authored and qiluo-msft committed Sep 17, 2021
1 parent 69443d7 commit 95f54cd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
{# Generate list of ports #}
{%- for port_idx in range(0,12) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 2) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 4) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 6) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 2) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 4) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 6) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(12,16) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(16,20) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 2) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 4) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 6) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 2) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 4) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 6) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(20,32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
{# Generate list of ports #}
{%- for port_idx in range(0,12) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 2) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 4) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 6) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 2) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 4) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 6) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(12,16) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(16,20) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 2) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 4) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 2) + 6) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 2) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 4) %}{%- endif %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8) + 6) %}{%- endif %}
{%- endfor %}
{%- for port_idx in range(20,32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 8)) %}{%- endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ phy $port TXFIR_TAP_CTL4r.3 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.3 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.3 TXFIR_TAP_LOAD=0x1

local port ce18
#*** lane 4 ***
phy $port TXFIR_TAP_CTL0r.4 TXFIR_TAP0_COEFF=0
phy $port TXFIR_TAP_CTL1r.4 TXFIR_TAP1_COEFF=0x1E8
Expand All @@ -382,8 +383,6 @@ phy $port TXFIR_TAP_CTL4r.4 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.4 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.4 TXFIR_TAP_LOAD=0x1


local port ce18
#*** lane 5 ***
phy $port TXFIR_TAP_CTL0r.5 TXFIR_TAP0_COEFF=0
phy $port TXFIR_TAP_CTL1r.5 TXFIR_TAP1_COEFF=0x1E8
Expand All @@ -393,6 +392,7 @@ phy $port TXFIR_TAP_CTL4r.5 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.5 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.5 TXFIR_TAP_LOAD=0x1

local port ce19
#*** lane 6 ***
phy $port TXFIR_TAP_CTL0r.6 TXFIR_TAP0_COEFF=0
phy $port TXFIR_TAP_CTL1r.6 TXFIR_TAP1_COEFF=0x1E8
Expand All @@ -402,7 +402,6 @@ phy $port TXFIR_TAP_CTL4r.6 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.6 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.6 TXFIR_TAP_LOAD=0x1

local port ce19
#*** lane 7 ***
phy $port TXFIR_TAP_CTL0r.7 TXFIR_TAP0_COEFF=4
phy $port TXFIR_TAP_CTL1r.7 TXFIR_TAP1_COEFF=0x1E4
Expand Down Expand Up @@ -974,6 +973,7 @@ phy $port TXFIR_TAP_CTL4r.5 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.5 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.5 TXFIR_TAP_LOAD=0x1

local port ce47
#*** lane 6 ***
phy $port TXFIR_TAP_CTL0r.6 TXFIR_TAP0_COEFF=0
phy $port TXFIR_TAP_CTL1r.6 TXFIR_TAP1_COEFF=0x1E8
Expand All @@ -983,7 +983,6 @@ phy $port TXFIR_TAP_CTL4r.6 TXFIR_TAP4_COEFF=0
phy $port TXFIR_TAP_CTL5r.6 TXFIR_TAP5_COEFF=0
phy $port TXFIR_TAP_CTL0r.6 TXFIR_TAP_LOAD=0x1

local port ce47
#*** lane 7 ***
phy $port TXFIR_TAP_CTL0r.7 TXFIR_TAP0_COEFF=4
phy $port TXFIR_TAP_CTL1r.7 TXFIR_TAP1_COEFF=0x1E4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ def get_transceiver_bulk_status(self):
Retrieves transceiver bulk status of this SFP
"""
tx_bias_list = []
tx_power_list = []
rx_power_list = []
transceiver_dom_dict = {}
transceiver_dom_dict = dict.fromkeys(dom_dict_keys, 'N/A')
Expand Down Expand Up @@ -751,7 +752,7 @@ def get_transceiver_bulk_status(self):
rx_power_list = self.get_rx_power()

if self.sfp_type == 'QSFP_DD':
if tx_bias_list is not None:
if tx_bias_list:
transceiver_dom_dict['tx1bias'] = tx_bias_list[0]
transceiver_dom_dict['tx2bias'] = tx_bias_list[1]
transceiver_dom_dict['tx3bias'] = tx_bias_list[2]
Expand All @@ -762,17 +763,17 @@ def get_transceiver_bulk_status(self):
transceiver_dom_dict['tx8bias'] = tx_bias_list[7]

elif self.sfp_type == 'QSFP':
if tx_bias_list is not None:
if tx_bias_list:
transceiver_dom_dict['tx1bias'] = tx_bias_list[0]
transceiver_dom_dict['tx2bias'] = tx_bias_list[1]
transceiver_dom_dict['tx3bias'] = tx_bias_list[2]
transceiver_dom_dict['tx4bias'] = tx_bias_list[3]
else:
if tx_bias_list is not None:
if tx_bias_list:
transceiver_dom_dict['tx1bias'] = tx_bias_list[0]

if self.sfp_type == 'QSFP_DD':
if rx_power_list is not None:
if rx_power_list:
transceiver_dom_dict['rx1power'] = rx_power_list[0]
transceiver_dom_dict['rx2power'] = rx_power_list[1]
transceiver_dom_dict['rx3power'] = rx_power_list[2]
Expand All @@ -783,17 +784,17 @@ def get_transceiver_bulk_status(self):
transceiver_dom_dict['rx8power'] = rx_power_list[7]

elif self.sfp_type == 'QSFP':
if rx_power_list is not None:
if rx_power_list:
transceiver_dom_dict['rx1power'] = rx_power_list[0]
transceiver_dom_dict['rx2power'] = rx_power_list[1]
transceiver_dom_dict['rx3power'] = rx_power_list[2]
transceiver_dom_dict['rx4power'] = rx_power_list[3]
else:
if rx_power_list is not None:
if rx_power_list:
transceiver_dom_dict['rx1power'] = rx_power_list[0]

if self.sfp_type == 'QSFP_DD':
if tx_power_list is not None:
if tx_power_list:
transceiver_dom_dict['tx1power'] = tx_power_list[0]
transceiver_dom_dict['tx2power'] = tx_power_list[1]
transceiver_dom_dict['tx3power'] = tx_power_list[2]
Expand All @@ -803,14 +804,14 @@ def get_transceiver_bulk_status(self):
transceiver_dom_dict['tx7power'] = tx_power_list[6]
transceiver_dom_dict['tx8power'] = tx_power_list[7]
elif self.sfp_type == 'QSFP':
if tx_power_list is not None:
if tx_power_list:
transceiver_dom_dict['tx1power'] = tx_power_list[0]
transceiver_dom_dict['tx2power'] = tx_power_list[1]
transceiver_dom_dict['tx3power'] = tx_power_list[2]
transceiver_dom_dict['tx4power'] = tx_power_list[3]
else:
if tx_power_list is not None:
transceiver_dom_dict['tx1power'] = tx_power_list[0]
if tx_power_list:
transceiver_dom_dict['tx1power'] = tx_power_list[0]
transceiver_dom_dict['rx_los'] = rx_los
transceiver_dom_dict['tx_fault'] = tx_fault
transceiver_dom_dict['reset_status'] = reset_state
Expand Down

0 comments on commit 95f54cd

Please sign in to comment.