From: Andrew Lunn <andrew@lunn.ch>
To: Sergei Antonov <saproj@gmail.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Pavel Skripkin <paskripkin@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Guobin Huang <huangguobin4@huawei.com>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH] net: moxa: inherit DMA masks to make dma_map_single() work
Date: Fri, 12 Aug 2022 18:38:43 +0200 [thread overview]
Message-ID: <YvaCE0lqfOi+tE5X@lunn.ch> (raw)
In-Reply-To: <CABikg9wm=8rbBFP0vaVHpGBJfXOi4k0bvwK7F+agMXEPfFn2RQ@mail.gmail.com>
On Fri, Aug 12, 2022 at 07:35:43PM +0300, Sergei Antonov wrote:
> On Fri, 12 Aug 2022 at 19:13, Andrew Lunn <andrew@lunn.ch> wrote:
> > > + /* Inherit the DMA masks from the platform device */
> > > + ndev->dev.dma_mask = p_dev->dma_mask;
> > > + ndev->dev.coherent_dma_mask = p_dev->coherent_dma_mask;
> >
> > There is only one other ethernet driver which does this. What you see
> > much more often is:
> >
> > alacritech/slicoss.c: paddr = dma_map_single(&sdev->pdev->dev, skb->data, maplen,
> > neterion/s2io.c: dma_map_single(&sp->pdev->dev, ba->ba_1,
> > dlink/dl2k.c: cpu_to_le64(dma_map_single(&np->pdev->dev, skb->data,
> > micrel/ksz884x.c: dma_buf->dma = dma_map_single(&hw_priv->pdev->dev, skb->data,
>
> Also works. Do you recommend to create a v2 of the patch?
Yes please. It makes things easier to maintain if every driver does
the same thing.
Andrew
next prev parent reply other threads:[~2022-08-12 16:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-12 15:48 [PATCH] net: moxa: inherit DMA masks to make dma_map_single() work Sergei Antonov
2022-08-12 16:13 ` Andrew Lunn
2022-08-12 16:35 ` Sergei Antonov
2022-08-12 16:38 ` Andrew Lunn [this message]
2022-08-12 16:58 ` Florian Fainelli
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=YvaCE0lqfOi+tE5X@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=huangguobin4@huawei.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paskripkin@gmail.com \
--cc=saproj@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.