-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Report errors returned by _qspi_configure_format #11603
Conversation
@kyle-cypress, thank you for your changes. |
I like the fixes, but I don't like to extend more error codes into the system. To me the The driver can produce more info by doing |
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.
LGTM , just a question about error numbering
Edit: rethinking my review after the above comment, missed it prior reviewing
QSPIF_BD_ERROR_INVALID_ERASE_PARAMS = -4005, /* Erase command not on sector aligned addresses or exceeds device size */ | ||
QSPIF_BD_ERROR_DEVICE_NOT_UNIQE = -4006, /* Only one instance per csel is allowed */ | ||
QSPIF_BD_ERROR_DEVICE_MAX_EXCEED = -4007 /* Max active QSPIF devices exceeded */ | ||
QSPIF_BD_ERROR_CONF_FORMAT_FAILED = -4005, /* Configure format failed */ |
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.
QSPIF_BD_ERROR_CONF_FORMAT_FAILED
shall this be 4008? Or this follows _FAILED
thus placed irght after the latest failure status and the rest is shifted.
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.
This is made moot by 5b3b147 which removes the new error code entirely.
@SeppoTakalo Acceptable patch would be to revert adding new error code and use |
Yes. When no new error codes are added, it does not change the API and is acceptable as a "fix" into the next patch release. |
Agreed |
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.
LGTM
@@ -302,17 +306,23 @@ int QSPIFBlockDevice::read(void *buffer, bd_addr_t addr, bd_size_t size) | |||
_mutex.lock(); |
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.
Remember to release this. Could you also check all the places where the code decides to jump to Scratch that, other places seem to be fine.goto exit_point
-label as the the same issue seems to be found also from other functions inside this file.
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.
Updated to follow the goto exit_point
pattern used everywhere else.
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@kyle-cypress looks like this needs a rebase |
5b3b147
to
9730ee2
Compare
Rebased |
The function returns a qspi_status_t but most usages in QSPIFBlockDevice assume that it always succeeds.
Use QSPIF_BD_ERROR_DEVICE_ERROR instead of introducing a new error code. Add tr_error calls whenever _qspi_configure_format fails to aid in debugging.
9730ee2
to
3f20b80
Compare
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.
Please see my previous comment.
Update to follow the same `goto exit_point` pattern that is used by the rest of the functions to avoid leaving the mutex locked when errors are detected and require the function to abort.
I missed the non-struck-out text at the beginning before. Should be fixed now. |
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.
Looks good to me
Hi |
CI restarted |
Test run: FAILEDSummary: 1 of 4 test jobs failed Failed test jobs:
|
There's internal CI license issue, we are investigating. |
CI restarted |
Test run: FAILEDSummary: 7 of 11 test jobs failed Failed test jobs:
|
CI restarted |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
The function returns a qspi_status_t but most usages in QSPIFBlockDevice assume that it always succeeds.
Pull request type
Reviewers
Release Notes