Skip to content
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: can_mcan: One shot mode support #79995

Closed
wants to merge 1 commit into from

Conversation

palisows
Copy link

  • added ability to switch off automatic frames repetition

- added ability to switch off automatic frames repetition

Signed-off-by: Pawel Lisowski <[email protected]>
Copy link

Hello @palisows, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Copy link
Member

@henrikbrixandersen henrikbrixandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but this patch does have the issue I mentioned in #79780 (comment) - If one-shot mode is enabled and the one-shot transmission fails, no TX callback is issued. It should have been called with -EIO according to the can_send() API documentation:

  * @retval -EIO if a general transmit error occurred (e.g. missing ACK if
  *              automatic retransmissions are disabled).

Furthermore, the TX slot is never freed in this case, since the driver code is not set up to handle TX aborts.

The funny thing is that I prepared a similar change two years ago, but ran into the same problem: vestas-wind-systems@f39f1ee

I do have one-shot mode support for Bosch M_CAN on my TODO list, but it will be bundled with support for TX aborts, since it needs the same kind of code paths to handle it correctly.

@palisows
Copy link
Author

Oh, sorry. I've got can_send() secured with timeout on app level so that's why I didn't notice issue with missing tx_callback.
This feature is nice to have for me so for moment will not continue with tx_callback issue.

@palisows palisows closed this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants