public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: Conley Lee <conleylee@foxmail.com>
Cc: davem@davemloft.net, kuba@kernel.org, mripard@kernel.org,
	wens@csie.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev,
	jernej.skrabec@gmail.com
Subject: Re: [PATCH v6] sun4i-emac.c: add dma support
Date: Sun, 2 Jan 2022 18:38:51 +0100	[thread overview]
Message-ID: <YdHjK+/SzaeI/V2Q@Red> (raw)
In-Reply-To: <tencent_57960DDC83F43DA3E0A2F47DEBAD69A4A005@qq.com>

Le Sat, Jan 01, 2022 at 03:09:01PM +0800, Conley Lee a écrit :
> On 12/31/21 at 11:43上午, Corentin Labbe wrote:
> > Date: Fri, 31 Dec 2021 11:43:53 +0100
> > From: Corentin Labbe <clabbe.montjoie@gmail.com>
> > To: conleylee@foxmail.com
> > Cc: davem@davemloft.net, kuba@kernel.org, mripard@kernel.org,
> >  wens@csie.org, netdev@vger.kernel.org,
> >  linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH v6] sun4i-emac.c: add dma support
> > 
> > Le Wed, Dec 29, 2021 at 09:43:51AM +0800, conleylee@foxmail.com a écrit :
> > > From: Conley Lee <conleylee@foxmail.com>
> > > 
> > > Thanks for your review. Here is the new version for this patch.
> > > 
> > > This patch adds support for the emac rx dma present on sun4i. The emac
> > > is able to move packets from rx fifo to RAM by using dma.
> > > 
> > > Change since v4.
> > >   - rename sbk field to skb
> > >   - rename alloc_emac_dma_req to emac_alloc_dma_req
> > >   - using kzalloc(..., GPF_ATOMIC) in interrupt context to avoid
> > >     sleeping
> > >   - retry by using emac_inblk_32bit when emac_dma_inblk_32bit fails
> > >   - fix some code style issues 
> > > 
> > > Change since v5.
> > >   - fix some code style issue
> > > 
> > 
> > Hello
> > 
> > I just tested this on a sun4i-a10-olinuxino-lime
> > 
> > I got:
> > [    2.922812] sun4i-emac 1c0b000.ethernet (unnamed net_device) (uninitialized): get io resource from device: 0x1c0b000, size = 4096
> > [    2.934512] sun4i-emac 1c0b000.ethernet (unnamed net_device) (uninitialized): failed to request dma channel. dma is disabled
> > [    2.945740] sun4i-emac 1c0b000.ethernet (unnamed net_device) (uninitialized): configure dma failed. disable dma.
> > [    2.957887] sun4i-emac 1c0b000.ethernet: eth0: at (ptrval), IRQ 19 MAC: 02:49:09:40:ab:3d
> > 
> > On which board did you test it and how ?
> > 
> > Regards
> 
> Sorry. I sent the email with text/html format. This email is an clean version.
> 
> In order to enable dma rx channel. `dmas` and `dma-names` properties
> should be added to emac section in dts:
> 
> emac: ethernet@1c0b000 {
> 	...
> 	dmas = <&dma SUN4I_DMA_DEDICATED 7>;
> 	dma-names = "rx";
> 	...
> }

Helo

Yes I figured that out. But you should have done a patch serie adding this.
Your patch is now applied but it is a useless change without the dtb change.
You should also probably update the driver binding (Documentation/devicetree/bindings/net/allwinner,sun4i-a10-emac.yaml) since you add new members to DT node.

Furthermore, why did you add RX only and not TX dma also ?

Probably it is too late since patch is applied but it is:
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Tested-on: sun4i-a10-olinuxino-lime

Regards

  parent reply	other threads:[~2022-01-02 17:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_95A0609A0DC523F7DDAE60A8746EABAA8905@qq.com>
     [not found] ` <tencent_A7052D6C7B1E2AEFA505D7A52E5B974D8508@qq.com>
2021-12-29  0:48   ` [PATCH v5] sun4i-emac.c: add dma support Jakub Kicinski
2021-12-29  1:43     ` [PATCH v6] " conleylee
2021-12-30  2:00       ` patchwork-bot+netdevbpf
2022-05-30  4:51         ` Corentin Labbe
2022-05-30 18:48           ` Jakub Kicinski
2022-05-30 18:55             ` Corentin Labbe
2021-12-31 10:43       ` Corentin Labbe
     [not found]         ` <tencent_57960DDC83F43DA3E0A2F47DEBAD69A4A005@qq.com>
2022-01-02 17:38           ` Corentin Labbe [this message]
     [not found]             ` <tencent_67023336008FE777A58293D2D32DEFA69107@qq.com>
2022-01-03 11:42               ` Corentin Labbe
2022-01-03 12:21                 ` Conley Lee
     [not found]                 ` <tencent_E4BA4D6105A46CCC1E8AEF48057EA5FE5B08@qq.com>
2022-01-09 20:45                   ` [PATCH v1] sun4i-emac.c: enable emac tx dma Corentin Labbe
2022-01-10  7:47                     ` Conley Lee
2022-01-07 23:34       ` [PATCH v6] sun4i-emac.c: add dma support Kees Cook
2022-01-08  2:34         ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YdHjK+/SzaeI/V2Q@Red \
    --to=clabbe.montjoie@gmail.com \
    --cc=conleylee@foxmail.com \
    --cc=davem@davemloft.net \
    --cc=jernej.skrabec@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mripard@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox