Skip to content

Commit

Permalink
Fix port range error for port-30
Browse files Browse the repository at this point in the history
  • Loading branch information
Jostar Yang committed May 19, 2021
1 parent a81b709 commit 5bcfd9a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def __init__(self, sfp_index=0):
self.index = sfp_index
self.port_num = self.index + 1

cpld_idx = 0 if self.port_num >= 30 else 1
cpld_idx = 0 if self.port_num > 30 else 1
bus = CPLD_ADDR_MAPPING[cpld_idx]["bus"]
addr = CPLD_ADDR_MAPPING[cpld_idx]["addr"]
self.cpld_path = CPLD_I2C_PATH.format(bus, addr)
Expand Down

0 comments on commit 5bcfd9a

Please sign in to comment.