-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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: ethernet: eth_sam_gmac: Fix priority queues #22961
drivers: ethernet: eth_sam_gmac: Fix priority queues #22961
Conversation
c778ff6
to
e3016be
Compare
All checks are passing now. checkpatch (informational only, not a failure)
Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages. |
e3016be
to
82a79f8
Compare
82a79f8
to
3309955
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.
Verified working on SAM E70 Rev. B.
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, I do have however some comments related to style.
3309955
to
e1ff7fb
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.
Sorry for the late review. I have two minor non-blocking comments. I won't be able to re-review the code in the next few days in case there are changes.
The first revision of the SAM E70 soc had three queues. The current revision B has six queues. If we don't initialize all queues, the DMA engine gets stuck when trying to read a descriptor from NULL. To enable the initialization of the additional queues, the correct soc has to be selected in the config options, f.ex. CONFIG_SOC_PART_NUMBER_SAME70Q21B instead of CONFIG_SOC_PART_NUMBER_SAME70Q21. Also rename GMAC_QUEUE_NO to GMAC_QUEUE_NUM as requested during review. Signed-off-by: Daniel Glöckner <dg@emlix.com>
Add missing queue entries for sam gmac. This update the queue selection to proper handle all supported SAM SoC that uses GMAC driver. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The Atmel SAM SoC with ethernet port uses same GMAC driver. However, there are differences between SoC GMAC implementation. Some SoCs have priority queue and system can configure 0 up to 5, depending of SoC version. This update current GMAC driver adding missing definitions. Co-authored-by: Stephanos Ioannidis <root@stephanos.io> Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Move queue init block to avoid add many defines on code. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Improve priority queue conditional build. Now priority queue code is enabled only if device have support to it. This enables GMAC driver for devices with only one queue for RX/TX. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
e1ff7fb
to
821170d
Compare
@jhedberg Could we merge this for 2.2? Without this patch, the revision B SAM7 series devices (which all newly produced SAM7s are) cannot transmit Ethernet packets. |
Could you explain first what's going on with the linked issues. Both of them are closed, so exactly what GitHub issue is this fixing? |
@jhedberg Those issues should not have been closed, as the problem described there was not fixed (though both issues were more of a "question" that a proper "bug report"). This PR fixes the problem reported in #22890 and #23035. p.s. the importance of this PR is that, for instance, if you buy a reel of |
The Atmel SAM SoC with ethernet port uses same GMAC driver. However, there are differences between SoC GMAC implementation. Some SoCs have priority queue and system can configure 0 up to 5, depending of SoC version. This update current GMAC driver adding missing definitions.
I already tested with SAM_V71_XULT using 6 queues [5 pri queues] with samples/net/telnet with DHCP. Ping is working OK using telnet terminal. It needs people to test SAME70[B]. I already tested SAM_V71_XULT as SAMV71A variation and seems to works well.
I added Kconfig rules to make sure user can only select proper queue size.
NOTE for SAM4E: Not yet supported.
NOTE for SAME70[B]: zephyrproject-rtos/hal_atmel#7
This work is based on slack discussion this week and the start point was #12711.
This PR supersedes #12711 (closes #12711).