drivers: serial: Fix async to interrupt driven adaptation layer #68319
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.
Whenever UART_RX_DISABLED event is received module attempts to re-enable receiver since in interrupt driven API receiver is always on. However, it is possible that there is no free buffers and in that case attempt to enable the receiver will fail with -EBUSY. That scenario shall be accepted since the receiver will be re-enabled when at least one buffer will be freed.
Given that, -EBUSY return shall be accepted (no assert) and number of pending RX buffer requests shall be reset only on successful enabling.