Skip to content

Commit

Permalink
[barefoot][platform] increase init timeout in eeprom.py (#5006)
Browse files Browse the repository at this point in the history
Because of platform-specific reasons I have to increase init timeout in (platform-plugin)/eeprom.py
  • Loading branch information
vboykox committed Jul 20, 2020
1 parent c6027ab commit 52c3a23
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
EEPROM_STATUS = "/var/run/platform/eeprom/status"

class board(eeprom_tlvinfo.TlvInfoDecoder):
RETRIES = 3
RETRIES = 35

def __init__(self, name, path, cpld_root, ro):

Expand All @@ -101,8 +101,10 @@ def __init__(self, name, path, cpld_root, ro):
super(board, self).__init__(self.eeprom_path, 0, EEPROM_STATUS, True)

for attempt in range(self.RETRIES):
if self.eeprom_init() or (attempt + 1 >= self.RETRIES):
if self.eeprom_init():
break
if attempt + 1 == self.RETRIES:
raise RuntimeError("eeprom.py: Initialization failed")
time.sleep(1)

def thrift_setup(self):
Expand Down

0 comments on commit 52c3a23

Please sign in to comment.