[Edgecore][AS7327-56X] Support BMC Enable#100
Open
rayxhuangEC wants to merge 3 commits intoaccton:support_new_platform_and_syncfrom
Open
[Edgecore][AS7327-56X] Support BMC Enable#100rayxhuangEC wants to merge 3 commits intoaccton:support_new_platform_and_syncfrom
rayxhuangEC wants to merge 3 commits intoaccton:support_new_platform_and_syncfrom
Conversation
What did I do: * Add BMC enable sysfs in cpld driver * Add as7327-56x-psu_bmc and as7327-56x-thermal_bmc driver * Fix ONLP psui, fani, thermali to get different sysfs node according to the BMC status. * Add onlp_dir_read to list the directory Signed-off-by: rayx_huang <rayx_huang@edge-core.com>
Author
|
@vincentchiang-ec please help review |
| int subdir_path_get(char *root, char *prefix, int prefix_len, char *path, int path_len) | ||
| { | ||
| int rv = 0; | ||
| char tmp[30]; |
There was a problem hiding this comment.
30 is quite small length, better to enlarge it to 100.
|
|
||
| static void | ||
| onlp_psu_str_check(char *str, int buffer_size) | ||
| { |
There was a problem hiding this comment.
Better to add a check whether "strlen(str)" is 0, or it will lead to access "str[-1]".
| # initiate PSU-2 | ||
| ('as7327_56x_psu2', 0x59, 2), | ||
| ]) | ||
| time.sleep(1) |
There was a problem hiding this comment.
Sleep 1 second is not a reliable operation, add a check mechanism.
timeout = 5
while timeout > 0:
if os.path.exists(BMC_ENABLE_NODE):
break
time.sleep(1)
timeout -= 1
|
|
||
| val = as7327_56x_cpld_read_internal(client, 0x82); | ||
| if(val < 0) | ||
| return -1; |
There was a problem hiding this comment.
Keep the original faliure error code.
|
|
||
| val = as7327_56x_cpld_read_internal(client, 0x80); | ||
| if(val < 0) | ||
| return -1; |
There was a problem hiding this comment.
Keep the original faliure error code.
Author
|
Output of onlpdump |
What did I do * Add psu fan direction * Remove ONLP_FAN_CAPS_SET_PERCENTAGE from psu fan * Remove ONLP_FAN_CAPS_SET_PERCENTAGE from chassis fan when BMC is enabled * Add retry 5 times in the platform init Signed-off-by: rayx_huang <rayx_huang@edge-core.com>
What did I do: * Keep the original faliure error code Signed-off-by: rayx_huang <rayx_huang@edge-core.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What did I do: