[device] as7326-56x: Fix the default low power mode on issue (#4047)
Signed-off-by: brandon_chuang <brandon_chuang@edge-core.com>
This commit is contained in:
parent
c2677a5614
commit
38b7d30295
@ -175,12 +175,13 @@ class SfpUtil(SfpUtilBase):
|
|||||||
eeprom.seek(93)
|
eeprom.seek(93)
|
||||||
lpmode = ord(eeprom.read(1))
|
lpmode = ord(eeprom.read(1))
|
||||||
|
|
||||||
if ((lpmode & 0x3) == 0x1):
|
if ((lpmode & 0x3) == 0x3):
|
||||||
return False # High Power Mode if "Power override" bit is 1 and "Power set" bit is 0
|
return True # Low Power Mode if "Power override" bit is 1 and "Power set" bit is 1
|
||||||
else:
|
else:
|
||||||
return True # Low Power Mode if one of the following conditions is matched:
|
return False # High Power Mode if one of the following conditions is matched:
|
||||||
# 1. Power override" bit is 0
|
# 1. "Power override" bit is 0
|
||||||
# 2. Power override" bit is 1 and "Power set" bit is 1
|
# 2. "Power override" bit is 1 and "Power set" bit is 0
|
||||||
|
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
print "Error: unable to open file: %s" % str(e)
|
print "Error: unable to open file: %s" % str(e)
|
||||||
return False
|
return False
|
||||||
|
Reference in New Issue
Block a user