Skip to content

Commit

Permalink
Fix LGTM and port index error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jostar Yang committed Oct 29, 2021
1 parent 08168dc commit 3abd4c7
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 137 deletions.
256 changes: 128 additions & 128 deletions device/accton/x86_64-accton_minipack-r0/Accton-MINIPACK/port_config.ini
Original file line number Diff line number Diff line change
@@ -1,129 +1,129 @@
# name lanes alias index
Ethernet1 5,6 onehundredGigE1 0
Ethernet2 7,8 onehundredGigE2 1
Ethernet3 1,2 onehundredGigE3 2
Ethernet4 3,4 onehundredGigE4 3
Ethernet5 37,38 onehundredGigE5 4
Ethernet6 39,40 onehundredGigE6 5
Ethernet7 33,34 onehundredGigE7 6
Ethernet8 35,36 onehundredGigE8 7
Ethernet9 69,70 onehundredGigE9 8
Ethernet10 71,72 onehundredGigE10 9
Ethernet11 65,66 onehundredGigE11 10
Ethernet12 67,68 onehundredGigE12 11
Ethernet13 101,102 onehundredGigE13 12
Ethernet14 103,104 onehundredGigE14 13
Ethernet15 97,98 onehundredGigE15 14
Ethernet16 99,100 onehundredGigE16 15
Ethernet17 13,14 onehundredGigE17 16
Ethernet18 15,16 onehundredGigE18 17
Ethernet19 9,10 onehundredGigE19 18
Ethernet20 11,12 onehundredGigE20 19
Ethernet21 45,46 onehundredGigE21 20
Ethernet22 47,48 onehundredGigE22 21
Ethernet23 41,42 onehundredGigE23 22
Ethernet24 43,44 onehundredGigE24 23
Ethernet25 77,78 onehundredGigE25 24
Ethernet26 79,80 onehundredGigE26 25
Ethernet27 73,74 onehundredGigE27 26
Ethernet28 75,76 onehundredGigE28 27
Ethernet29 109,110 onehundredGigE29 28
Ethernet30 111,112 onehundredGigE30 29
Ethernet31 105,106 onehundredGigE31 30
Ethernet32 107,108 onehundredGigE32 31
Ethernet33 21,22 onehundredGigE33 32
Ethernet34 23,24 onehundredGigE34 33
Ethernet35 17,18 onehundredGigE35 34
Ethernet36 19,20 onehundredGigE36 35
Ethernet37 53,54 onehundredGigE37 36
Ethernet38 55,56 onehundredGigE38 37
Ethernet39 49,50 onehundredGigE39 38
Ethernet40 51,52 onehundredGigE40 39
Ethernet41 85,86 onehundredGigE41 40
Ethernet42 87,88 onehundredGigE42 41
Ethernet43 81,82 onehundredGigE43 42
Ethernet44 83,84 onehundredGigE44 43
Ethernet45 117,118 onehundredGigE45 44
Ethernet46 119,120 onehundredGigE46 45
Ethernet47 113,114 onehundredGigE47 46
Ethernet48 115,116 onehundredGigE48 47
Ethernet49 29,30 onehundredGigE49 48
Ethernet50 31,32 onehundredGigE50 49
Ethernet51 25,26 onehundredGigE51 50
Ethernet52 27,28 onehundredGigE52 51
Ethernet53 61,62 onehundredGigE53 52
Ethernet54 63,64 onehundredGigE54 53
Ethernet55 57,58 onehundredGigE55 54
Ethernet56 59,60 onehundredGigE56 55
Ethernet57 93,94 onehundredGigE57 56
Ethernet58 95,96 onehundredGigE58 57
Ethernet59 89,90 onehundredGigE59 58
Ethernet60 91,92 onehundredGigE60 59
Ethernet61 125,126 onehundredGigE61 60
Ethernet62 127,128 onehundredGigE62 61
Ethernet63 121,122 onehundredGigE63 62
Ethernet64 123,124 onehundredGigE64 63
Ethernet65 133,134 onehundredGigE65 64
Ethernet66 135,136 onehundredGigE66 65
Ethernet67 129,130 onehundredGigE67 66
Ethernet68 131,132 onehundredGigE68 67
Ethernet69 165,166 onehundredGigE69 68
Ethernet70 167,168 onehundredGigE70 69
Ethernet71 161,162 onehundredGigE71 70
Ethernet72 163,164 onehundredGigE72 71
Ethernet73 197,198 onehundredGigE73 72
Ethernet74 199,200 onehundredGigE74 73
Ethernet75 193,194 onehundredGigE75 74
Ethernet76 195,196 onehundredGigE76 75
Ethernet77 229,230 onehundredGigE77 76
Ethernet78 231,232 onehundredGigE78 77
Ethernet79 225,226 onehundredGigE79 78
Ethernet80 227,228 onehundredGigE80 79
Ethernet81 141,142 onehundredGigE81 80
Ethernet82 143,144 onehundredGigE82 81
Ethernet83 137,138 onehundredGigE83 82
Ethernet84 139,140 onehundredGigE84 83
Ethernet85 173,174 onehundredGigE85 84
Ethernet86 175,176 onehundredGigE86 85
Ethernet87 169,170 onehundredGigE87 86
Ethernet88 171,172 onehundredGigE88 87
Ethernet89 205,206 onehundredGigE89 88
Ethernet90 207,208 onehundredGigE90 89
Ethernet91 201,202 onehundredGigE91 90
Ethernet92 203,204 onehundredGigE92 91
Ethernet93 237,238 onehundredGigE93 92
Ethernet94 239,240 onehundredGigE94 93
Ethernet95 233,234 onehundredGigE95 94
Ethernet96 235,236 onehundredGigE96 95
Ethernet97 149,150 onehundredGigE97 96
Ethernet98 151,152 onehundredGigE98 97
Ethernet99 145,146 onehundredGigE99 98
Ethernet100 147,148 onehundredGigE100 99
Ethernet101 181,182 onehundredGigE101 100
Ethernet102 183,184 onehundredGigE102 101
Ethernet103 177,178 onehundredGigE103 102
Ethernet104 179,180 onehundredGigE104 103
Ethernet105 213,214 onehundredGigE105 104
Ethernet106 215,216 onehundredGigE106 105
Ethernet107 209,210 onehundredGigE107 106
Ethernet108 211,212 onehundredGigE108 107
Ethernet109 245,246 onehundredGigE109 108
Ethernet110 247,248 onehundredGigE110 109
Ethernet111 241,242 onehundredGigE111 110
Ethernet112 243,244 onehundredGigE112 111
Ethernet113 157,158 onehundredGigE113 112
Ethernet114 159,160 onehundredGigE114 113
Ethernet115 153,154 onehundredGigE115 114
Ethernet116 155,156 onehundredGigE116 115
Ethernet117 189,190 onehundredGigE117 116
Ethernet118 191,192 onehundredGigE118 117
Ethernet119 185,186 onehundredGigE119 118
Ethernet120 187,188 onehundredGigE120 119
Ethernet121 221,222 onehundredGigE121 120
Ethernet122 223,224 onehundredGigE122 121
Ethernet123 217,218 onehundredGigE123 122
Ethernet124 219,220 onehundredGigE124 123
Ethernet125 253,254 onehundredGigE125 124
Ethernet126 255,256 onehundredGigE126 125
Ethernet127 249,250 onehundredGigE127 126
Ethernet128 251,252 onehundredGigE128 127
Ethernet1 5,6 onehundredGigE1 1
Ethernet2 7,8 onehundredGigE2 2
Ethernet3 1,2 onehundredGigE3 3
Ethernet4 3,4 onehundredGigE4 4
Ethernet5 37,38 onehundredGigE5 5
Ethernet6 39,40 onehundredGigE6 6
Ethernet7 33,34 onehundredGigE7 7
Ethernet8 35,36 onehundredGigE8 8
Ethernet9 69,70 onehundredGigE9 9
Ethernet10 71,72 onehundredGigE10 10
Ethernet11 65,66 onehundredGigE11 11
Ethernet12 67,68 onehundredGigE12 12
Ethernet13 101,102 onehundredGigE13 13
Ethernet14 103,104 onehundredGigE14 14
Ethernet15 97,98 onehundredGigE15 15
Ethernet16 99,100 onehundredGigE16 16
Ethernet17 13,14 onehundredGigE17 17
Ethernet18 15,16 onehundredGigE18 18
Ethernet19 9,10 onehundredGigE19 19
Ethernet20 11,12 onehundredGigE20 20
Ethernet21 45,46 onehundredGigE21 21
Ethernet22 47,48 onehundredGigE22 22
Ethernet23 41,42 onehundredGigE23 23
Ethernet24 43,44 onehundredGigE24 24
Ethernet25 77,78 onehundredGigE25 25
Ethernet26 79,80 onehundredGigE26 26
Ethernet27 73,74 onehundredGigE27 27
Ethernet28 75,76 onehundredGigE28 28
Ethernet29 109,110 onehundredGigE29 29
Ethernet30 111,112 onehundredGigE30 30
Ethernet31 105,106 onehundredGigE31 31
Ethernet32 107,108 onehundredGigE32 32
Ethernet33 21,22 onehundredGigE33 33
Ethernet34 23,24 onehundredGigE34 34
Ethernet35 17,18 onehundredGigE35 35
Ethernet36 19,20 onehundredGigE36 36
Ethernet37 53,54 onehundredGigE37 37
Ethernet38 55,56 onehundredGigE38 38
Ethernet39 49,50 onehundredGigE39 39
Ethernet40 51,52 onehundredGigE40 40
Ethernet41 85,86 onehundredGigE41 41
Ethernet42 87,88 onehundredGigE42 42
Ethernet43 81,82 onehundredGigE43 43
Ethernet44 83,84 onehundredGigE44 44
Ethernet45 117,118 onehundredGigE45 45
Ethernet46 119,120 onehundredGigE46 46
Ethernet47 113,114 onehundredGigE47 47
Ethernet48 115,116 onehundredGigE48 48
Ethernet49 29,30 onehundredGigE49 49
Ethernet50 31,32 onehundredGigE50 50
Ethernet51 25,26 onehundredGigE51 51
Ethernet52 27,28 onehundredGigE52 52
Ethernet53 61,62 onehundredGigE53 53
Ethernet54 63,64 onehundredGigE54 54
Ethernet55 57,58 onehundredGigE55 55
Ethernet56 59,60 onehundredGigE56 56
Ethernet57 93,94 onehundredGigE57 57
Ethernet58 95,96 onehundredGigE58 58
Ethernet59 89,90 onehundredGigE59 59
Ethernet60 91,92 onehundredGigE60 60
Ethernet61 125,126 onehundredGigE61 61
Ethernet62 127,128 onehundredGigE62 62
Ethernet63 121,122 onehundredGigE63 63
Ethernet64 123,124 onehundredGigE64 64
Ethernet65 133,134 onehundredGigE65 65
Ethernet66 135,136 onehundredGigE66 66
Ethernet67 129,130 onehundredGigE67 67
Ethernet68 131,132 onehundredGigE68 68
Ethernet69 165,166 onehundredGigE69 69
Ethernet70 167,168 onehundredGigE70 70
Ethernet71 161,162 onehundredGigE71 71
Ethernet72 163,164 onehundredGigE72 72
Ethernet73 197,198 onehundredGigE73 73
Ethernet74 199,200 onehundredGigE74 74
Ethernet75 193,194 onehundredGigE75 75
Ethernet76 195,196 onehundredGigE76 76
Ethernet77 229,230 onehundredGigE77 77
Ethernet78 231,232 onehundredGigE78 78
Ethernet79 225,226 onehundredGigE79 79
Ethernet80 227,228 onehundredGigE80 80
Ethernet81 141,142 onehundredGigE81 81
Ethernet82 143,144 onehundredGigE82 82
Ethernet83 137,138 onehundredGigE83 83
Ethernet84 139,140 onehundredGigE84 84
Ethernet85 173,174 onehundredGigE85 85
Ethernet86 175,176 onehundredGigE86 86
Ethernet87 169,170 onehundredGigE87 87
Ethernet88 171,172 onehundredGigE88 88
Ethernet89 205,206 onehundredGigE89 89
Ethernet90 207,208 onehundredGigE90 90
Ethernet91 201,202 onehundredGigE91 91
Ethernet92 203,204 onehundredGigE92 92
Ethernet93 237,238 onehundredGigE93 93
Ethernet94 239,240 onehundredGigE94 94
Ethernet95 233,234 onehundredGigE95 95
Ethernet96 235,236 onehundredGigE96 96
Ethernet97 149,150 onehundredGigE97 97
Ethernet98 151,152 onehundredGigE98 98
Ethernet99 145,146 onehundredGigE99 99
Ethernet100 147,148 onehundredGigE100 100
Ethernet101 181,182 onehundredGigE101 101
Ethernet102 183,184 onehundredGigE102 102
Ethernet103 177,178 onehundredGigE103 103
Ethernet104 179,180 onehundredGigE104 104
Ethernet105 213,214 onehundredGigE105 105
Ethernet106 215,216 onehundredGigE106 106
Ethernet107 209,210 onehundredGigE107 107
Ethernet108 211,212 onehundredGigE108 108
Ethernet109 245,246 onehundredGigE109 109
Ethernet110 247,248 onehundredGigE110 110
Ethernet111 241,242 onehundredGigE111 111
Ethernet112 243,244 onehundredGigE112 112
Ethernet113 157,158 onehundredGigE113 113
Ethernet114 159,160 onehundredGigE114 114
Ethernet115 153,154 onehundredGigE115 115
Ethernet116 155,156 onehundredGigE116 116
Ethernet117 189,190 onehundredGigE117 117
Ethernet118 191,192 onehundredGigE118 118
Ethernet119 185,186 onehundredGigE119 119
Ethernet120 187,188 onehundredGigE120 120
Ethernet121 221,222 onehundredGigE121 121
Ethernet122 223,224 onehundredGigE122 122
Ethernet123 217,218 onehundredGigE123 123
Ethernet124 219,220 onehundredGigE124 124
Ethernet125 253,254 onehundredGigE125 125
Ethernet126 255,256 onehundredGigE126 126
Ethernet127 249,250 onehundredGigE127 127
Ethernet128 251,252 onehundredGigE128 128
12 changes: 7 additions & 5 deletions device/accton/x86_64-accton_minipack-r0/sonic_platform/sfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,6 @@ class Sfp(SfpBase):
HOST_CHK_CMD = "which systemctl > /dev/null 2>&1"
PLATFORM = "x86_64-accton_minipack-r0"
HWSKU = "Accton-MINIPACK"
#LOCAL_OOM_PATH = "/usr/local/bin/minipack_qsfp/port%d_eeprom"
# port_N is from 0 to 127


def __init__(self, sfp_index=0, sfp_name=None):
self._api_helper=APIHelper()
Expand All @@ -284,7 +281,7 @@ def __init__(self, sfp_index=0, sfp_name=None):
self._eeprom_path = self._get_eeprom_path()
#pim = FpgaUtil()
#pim.init_pim_fpga()
self._dom_capability_detect()
#self._dom_capability_detect()

SfpBase.__init__(self)

Expand Down Expand Up @@ -552,6 +549,11 @@ def get_transceiver_info(self):
transceiver_info_dict = dict.fromkeys(
info_dict_keys, NULL_VAL)
transceiver_info_dict["specification_compliance"] = '{}'

# If some port is not inserted module when xcvrd do _init_(), it will not get port_type from eeprom.
# So its defaut type is QSFP. But user can insert QSFP-DD to the port later
# So we need to check port before access port eeporm.
self._dom_capability_detect()

# ToDo: OSFP tranceiver info parsing not fully supported.
# in inf8628.py lack of some memory map definition
Expand Down Expand Up @@ -1286,7 +1288,7 @@ def get_reset_status(self):
A Boolean, True if reset enabled, False if disabled
"""
if not self.get_presence():
return True #FPGA SPEC:It is set to 1¡¦s if the corresponding QSFP is not present
return True #FPGA SPEC:It is set to 1 if the corresponding QSFP is not present

pim=FpgaUtil()
val=pim.get_reset(self.port_num-1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@
# 5/29/2019: Jostar create for minipack
# -----------------------------------------------------------
try:
import sys
import time # this is only being used as part of the example
import fbfpgaio
import re
import time
from select import select

except ImportError as e:
raise ImportError('%s - required module not found' % str(e))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python

import sys
from setuptools import setup, Extension
os.listdir

Expand Down

0 comments on commit 3abd4c7

Please sign in to comment.