Fix set port_name to incorrect sysfs

This commit is contained in:
Jostar Yang
2018-11-20 14:50:04 +08:00
parent 48ded65d2d
commit 6122f29ee6

View File

@@ -71,7 +71,7 @@ class OnlPlatform_x86_64_accton_as9716_32d_r0(OnlPlatformAccton,
# initialize QSFP port 1~34
for port in range(1, 35):
self.new_i2c_device('optoe1', 0x50, port+24)
subprocess.call('echo port%d > /sys/bus/i2c/devices/%d-0050/port_name' % (port, port+20), shell=True)
subprocess.call('echo port%d > /sys/bus/i2c/devices/%d-0050/port_name' % (port, port+24), shell=True)
self.new_i2c_device('24c02', 0x56, 0)