-
Notifications
You must be signed in to change notification settings - Fork 7.9k
drivers: dai: sai: don't crash on underrun/overrun #77236
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
drivers: dai: sai: don't crash on underrun/overrun #77236
Conversation
((dir) == DAI_DIR_RX ?\ | ||
SAI_RxClearStatusFlags(UINT_TO_I2S(regmap), which) :\ | ||
SAI_TxClearStatusFlags(UINT_TO_I2S(regmap), which)) | ||
|
||
/* used to retrieve the SYNC direction. Use this macro when you know for sure |
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.
@LaurentiuM1234 change looks good to me. Will approve once this warning is fixed.
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.
Tweaked the formatting of the macro as the clang-format
suggestion did improve the code readability IMO. Warning still persists because of the position of \
. I don't think this new suggestion improves code readability so unless we're required to make new code clang-format
-compliant I see no reason to go with it.
cfe549b
to
f5b6f14
Compare
TX/RX FIFO underrun shouldn't crash the RTOS when it occurs. Also, since this can also happen under "normal" conditions (i.e: DMA doesn't copy data fast enough from/to SAI's FIFOs) the software should be able to recover from it. As such: 1) Remove `z_irq_spurious()` call. 2) Clear error flag 3) De-escalate error message to warning message Signed-off-by: Laurentiu Mihalcea <[email protected]>
created bug report (#77633) for backporting |
TX/RX FIFO underrun shouldn't crash the RTOS when it occurs. Also, since this can also happen under "normal" conditions (i.e: DMA doesn't copy data fast enough from/to SAI's FIFOs) the software should be able to recover from it.
As such:
1) Remove
z_irq_spurious()
call.2) Clear error flag
3) De-escalate error message to warning message
Fixes #77633