Skip to content

Commit d1490de

Browse files
authored
[cmis] Add delay during CDB firmware download to remove I2C errors (sonic-net#580)
Signed-off-by: Mihir Patel <[email protected]>
1 parent 051a862 commit d1490de

File tree

1 file changed

+3
-1
lines changed
  • sonic_platform_base/sonic_xcvr/api/public

1 file changed

+3
-1
lines changed

sonic_platform_base/sonic_xcvr/api/public/cmisCDB.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
INIT_OFFSET = 128
2020
CMDLEN = 2
2121
MAX_WAIT = 600
22+
MAX_CDB_CMD_FOREGROUND_PROCESSING_TIME_tCDBF = 5 # seconds, as per tCDBF in CMIS spec
2223

2324

2425
class CmisCdbApi(XcvrApi):
@@ -284,7 +285,7 @@ def start_fw_download(self, startLPLsize, header, imagesize):
284285
cmd += header
285286
cmd[133-INIT_OFFSET] = self.cdb_chkcode(cmd)
286287
self.write_cdb(cmd)
287-
time.sleep(2)
288+
time.sleep(MAX_CDB_CMD_FOREGROUND_PROCESSING_TIME_tCDBF)
288289
status = self.cdb1_chkstatus()
289290
if (status != 0x1):
290291
if status > 127:
@@ -415,6 +416,7 @@ def validate_fw_image(self):
415416
cmd = bytearray(b'\x01\x07\x00\x00\x00\x00\x00\x00')
416417
cmd[133-INIT_OFFSET] = self.cdb_chkcode(cmd)
417418
self.write_cdb(cmd)
419+
time.sleep(MAX_CDB_CMD_FOREGROUND_PROCESSING_TIME_tCDBF)
418420
status = self.cdb1_chkstatus()
419421
if (status != 0x1):
420422
if status > 127:

0 commit comments

Comments
 (0)