Closed xyan264 closed 4 years ago
Updated. @lsgunth please take a look.
We shouldn't return a new error code to the user code and update user code for it. Instead, we should treat the SWITCHTEC_MRPC_STATUS_ERROR status as a special case of complete which indicates user to check return value, which also keep the compatibility.
Please review patch #87
Superseded by PR#87. Closed.
If an error is encountered when executing the MRPC command, firmware will set SWITCHTEC_MRPC_STATUS_ERROR and return the error code in return value register. We return this error code along with error number -ECOMM.
This fix does the same as in switchtec_user PR#190, except in PR190, the fix applies to I2C and UART devices, while this fix is for In-Band device.
Note the new ECOMM error number, later switchtec-user will add check for this error code and read out the error number as well. -- See switchtec-user PR#191