All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH net-next 9/9 v4] net: ethernet: ixp4xx: Use parent dev for DMA pool
Date: Fri, 10 Jan 2020 09:28:37 +0100	[thread overview]
Message-ID: <20200110082837.11473-10-linus.walleij@linaro.org> (raw)
In-Reply-To: <20200110082837.11473-1-linus.walleij@linaro.org>

Use the netdevice struct device .parent field when calling
dma_pool_create(): the .dma_coherent_mask and .dma_mask
pertains to the bus device on the hardware (platform)
bus in this case, not the struct device inside the network
device. This makes the pool allocation work.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v3->v4:
- Drop a stable tag and rebubmit.
ChangeLog v2->v3:
- Rebased on v5.5-rc1
ChangeLog v1->v2:
- Rebase with the rest of the series.
- Tag for stable, this is pretty serious.
- I have no real idea when this stopped working.
---
 drivers/net/ethernet/xscale/ixp4xx_eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index ee45215c4ba4..269596c15133 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -1086,7 +1086,7 @@ static int init_queues(struct port *port)
 	int i;
 
 	if (!ports_open) {
-		dma_pool = dma_pool_create(DRV_NAME, &port->netdev->dev,
+		dma_pool = dma_pool_create(DRV_NAME, port->netdev->dev.parent,
 					   POOL_ALLOC_SIZE, 32, 0);
 		if (!dma_pool)
 			return -ENOMEM;
-- 
2.21.0


  parent reply	other threads:[~2020-01-10  8:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  8:28 [PATCH net-next 0/9 v4] IXP4xx networking cleanups Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 1/9 v4] wan: ixp4xx_hss: fix compile-testing on 64-bit Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 2/9 v4] wan: ixp4xx_hss: prepare compile testing Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 3/9 v4] ptp: ixp46x: move adjacent to ethernet driver Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 4/9 v4] ixp4xx_eth: move platform_data definition Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 5/9 v4] net: ethernet: ixp4xx: Standard module init Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 6/9 v4] net: ethernet: ixp4xx: Use distinct local variable Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 7/9 v4] net: ehernet: ixp4xx: Use netdev_* messages Linus Walleij
2020-01-10  8:28 ` [PATCH net-next 8/9 v4] ARM/net: ixp4xx: Pass ethernet physical base as resource Linus Walleij
2020-01-10  8:28 ` Linus Walleij [this message]
2020-01-11  7:30 ` [PATCH net-next 0/9 v4] IXP4xx networking cleanups David Miller

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=20200110082837.11473-10-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=netdev@vger.kernel.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 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.