[barefoot][platform] increase init timeout in eeprom.py (#5146)

Because of platform-specific reasons I have to increase init timeout in (platform-plugin)/eeprom.py

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
This commit is contained in:
Volodymyr Boiko 2020-08-14 22:32:07 +03:00 committed by GitHub
parent f1e402194e
commit 13e260ba29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,7 @@ EEPROM_SYMLINK = "/var/run/platform/eeprom/syseeprom"
EEPROM_STATUS = "/var/run/platform/eeprom/status"
class board(eeprom_tlvinfo.TlvInfoDecoder):
RETRIES = 3
RETRIES = 35
def __init__(self, name, path, cpld_root, ro):
@ -101,8 +101,10 @@ class board(eeprom_tlvinfo.TlvInfoDecoder):
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):