Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Juniper] Platform bug fixes / improvements #5541

Merged
merged 5 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ portmap_38=37:100
xgxs_rx_lane_map_127=0x2301
xgxs_rx_lane_map_119=0x3120
xgxs_tx_lane_map_129=0x3120
l2_mem_entries=106496
l2_mem_entries=8192
os=unix
port_phy_addr_26=0xff
port_phy_addr_18=0xff
Expand Down Expand Up @@ -536,6 +536,7 @@ phy_xaui_tx_polarity_flip_94=0x01
phy_xaui_tx_polarity_flip_86=0x01
max_vp_lags=0
l3_max_ecmp_mode=1
l3_alpm_enable=2
portmap_98=95:25:50:i
portmap_3=3:25:50:i
miim_intr_enable=0x0
Expand All @@ -549,10 +550,9 @@ portmap_100=131:1
portmap_99=96:25:i
pbmp_oversubscribe=0xC4444451111111144444444422222222
portmap_4=4:25:i
l3_mem_entries=40960
l3_mem_entries=8192
xgxs_tx_lane_map_20=0x0213
xgxs_tx_lane_map_12=0x3120
num_ipv6_lpm_128b_entries=1024
port_phy_addr_95=0xff
port_phy_addr_87=0xff
port_phy_addr_79=0xff
Expand Down
140 changes: 140 additions & 0 deletions device/juniper/x86_64-juniper_qfx5200-r0/media_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,146 @@
"lane3":"0xa"
}
},
"JUNIPER-AVAGO-AFBR-89CDDZ-JU2": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"JUNIPER-FINISAR-FCBN425QE1C30-J1": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"JUNIPER-FINISAR-FCBN425QE1C10-J1": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"JUNIPER-FINISAR-FTLC9551REPM-J1": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"JUNIPER-FINISAR-FTLC9551REPM-J3": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"JUNIPER-INNO-TR-FC13L-NJC": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"JUNIPER-INNO-TR-FC13R-NJC": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"JUNIPER-SOURCE-SPQCELRCDFAJ2": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"JUNIPER-LUXTERA-LUX42604BO": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"JUNIPER-LUXTERA-LUX42604CO": {
"preemphasis": {
"lane0":"0x0c6400",
"lane1":"0x0c6400",
"lane2":"0x0c6400",
"lane3":"0x0c6400"
},
"idriver": {
"lane0":"0xa",
"lane1":"0xa",
"lane2":"0xa",
"lane3":"0xa"
}
},
"FINISAR CORP.-FTL4C1QE1C-J1": {
"preemphasis": {
"lane0":"0x115f00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,43 @@
import binascii
from sonic_eeprom import eeprom_tlvinfo

def main():
eeprom_qfx5200 = Eeprom()
FAN0_TYPE="cat /sys/devices/pci0000:00/0000:00:1c.0/0000:0f:00.0/refpga-tmc.15/fan0_type"

try:
status,fan0_type=commands.getstatusoutput(FAN0_TYPE)
except Exception as e:
print "Error on refpga-tmc.15 fan0_type e:" + str(e)
return False
def fantype_detect():

refpgaTMC_path = "/sys/devices/pci0000:00/0000:00:1c.0/0000:0f:00.0/refpga-tmc.15"

AFO = "1"
AFI = "0"

#default fan type is AFO
default_fantype = "0"

for filename in os.listdir(refpgaTMC_path):
if filename.endswith('_type'):
fantype_path = os.path.join(refpgaTMC_path, filename)
cat_string = "cat "
fantype_string = cat_string + fantype_path
status,fan_type=commands.getstatusoutput(fantype_string)
if ((fan_type == AFO) or (fan_type == AFI)):
return fan_type
else:
pass

return default_fantype



def main():
AFO_value = "1"

eeprom_qfx5200 = Eeprom()

fan_type = fantype_detect()

# creating the "/var/run/eeprom" file and storing values of CPU board EEPROM and MAIN Board EEPROM in this file.
eeprom_file = open ("/var/run/eeprom", "a+")
eeprom_file.write("\n")
if fan0_type == AFO:
if fan_type == AFO_value:
eeprom_file.write("Fan Type=AFO\r\n")
else:
eeprom_file.write("Fan Type=AFI\r\n")
Expand Down
6 changes: 5 additions & 1 deletion device/juniper/x86_64-juniper_qfx5200-r0/plugins/sfputil.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

SYSLOG_IDENTIFIER = "sfputil"

# Global logger class instance
# Global Logger class instance
logger = Logger(SYSLOG_IDENTIFIER)

qfx5200_qsfp_cable_length_tup = ('Length(km)', 'Length OM3(2m)',
Expand Down Expand Up @@ -331,12 +331,16 @@ class SfpUtil(SfpUtilBase):
"AFBR-89CDDZ-JU1",
"AFBR-89CDDZ-JU2",
"FTLC9551REPM-J1",
"FCBN425QE1C30-J1",
"FCBN425QE1C10-J1",
"FTLC9551REPM-J3",
"LUX42604CO",
"LUX42604BO",
"EOLQ-161HG-10-LJ1",
"FTLC1151RDPL-J1",
"TR-FC13R-NJC",
"TR-FC13L-NJC",
"TR-FC13R-NJ3",
"SPQ-CE-LR-CDFB-J2",
"1K1QAC",
"SPQCELRCDFAJ2"
Expand Down
Loading