Messages in this thread | | | Date | Sun, 9 Jan 2022 21:45:01 +0100 | From | Corentin Labbe <> | Subject | Re: [PATCH v1] sun4i-emac.c: enable emac tx dma |
| |
Le Sun, Jan 09, 2022 at 05:17:55PM +0800, conleylee@foxmail.com a écrit : > From: conley <conleylee@foxmail.com> > > Hello > I am reading the R40 user manual and trying to create a new path to enable > emac tx dma channel. According to the figure 8-21(TX Operation Diagram), > I try to enable emac tx dma channel by the follow steps: > 1. enable tx dma mode > 2. set packet lengths > 2. move data from skb to tx fifo by using dma in xmit function. > 3. start transfer from tx fifo to phy in dma tx done callback > > But it doesn't work. emac tx interrupt and dma finished interrupt are > raised, but no packets are transmitted (I test it by tcpdump). > Do you know how to configure the emac tx dma correctly? Thanks ~ >
Hello
Here are my thoughts to help you: - Your email is not a real patch, but an ask for help, so you should not use [ PATCH ] in the subject. - If it was a patch, "v1" is not necessary - Your patch below is doing too many unrelated different things, it is hard to see the DMA TX enable part - I think you could first send a preliminary patch which adds all EMAC_INT_CTL_TX_xxx which are already used by the driver (to reduce the diff) - Without the DTB change, it is hard to see the whole picture, did you correctly use the right dma number for an easy example. - Knowing also the board (and so PHY, modes etc...) could help - I think your priority should not to add TX, but to fix reported problems to your initial patch (build warnings/error https://marc.info/?l=linux-arm-kernel&m=164159846213585&w=2) since your work on TX will need to be applied after this. - For the previous point, always build test with at least 2 different 32/64 arch. And if possible a total different arch (like x86_64).
Anyway, I will try to test your patch on my a10 board
Regards
| |