-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DO NOT MERGE] Add debug logs to write_eeprom #28
base: master
Are you sure you want to change the base?
Conversation
@@ -528,12 +529,31 @@ def write_eeprom(self, offset, num_bytes, write_buffer): | |||
Example: | |||
mlxreg -d /dev/mst/mt52100_pciconf0 --reg_name MCIA --indexes slot_index=0,module=1,device_address=154,page_number=5,i2c_device_address=0x50,size=1,bank_number=0 --set dword[0]=0x01000000 -y | |||
""" | |||
|
|||
logger.log_error(f'--- err:-5_debug --- Entered write_eeprom()') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having LOG ERR add ERR message to LOG. You should change it to NOTICE\INFO
else: | ||
stack_trace.append(f"{func_name}()") | ||
execution_flow = " --> ".join(reversed(stack_trace)) | ||
logger.log_error(f'--- err:-5_debug --- Call Stack: {execution_flow}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having LOG ERR add ERR message to LOG. You should change it to NOTICE\INFO
if num_bytes != len(write_buffer): | ||
logger.log_error("Error mismatch between buffer length and number of bytes to be written") | ||
return False | ||
|
||
while num_bytes > 0: | ||
page_num, page, page_offset = self._get_page_and_page_offset(offset) | ||
logger.log_error(f'--- err:-5_debug --- Attempt to write to: page={page}, offset={page_offset}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having LOG ERR add ERR message to LOG. You should change it to NOTICE\INFO
Why I did it
To debug the 'err:-5' issue. Need to understand whether this error log appears as a result of a read eeprom operation (which in that case, can be ignored), or due to a write operation (needs to be handled).
Work item tracking
How I did it
Added logs.
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)