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.
Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij linus.walleij@linaro.org --- ChanegLog 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;
From: Linus Walleij linus.walleij@linaro.org Date: Mon, 6 Jan 2020 08:46:47 +0100
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.
Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij linus.walleij@linaro.org
Networking changes don't use CC:'ing stable, please see the netdev FAQ under Documentation/
And net-next changes don't go to stable.
If you want to submit this bug fix, submit to 'net' and provide an appropriate Fixes: tag.
Thank you.
On Mon, Jan 6, 2020 at 11:01 PM David Miller davem@redhat.com wrote:
From: Linus Walleij linus.walleij@linaro.org Date: Mon, 6 Jan 2020 08:46:47 +0100
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.
Cc: stable@vger.kernel.org Signed-off-by: Linus Walleij linus.walleij@linaro.org
Networking changes don't use CC:'ing stable, please see the netdev FAQ under Documentation/
Oh yeah I actually knew that now, just that the patch was written before I knew and I missed that was still in there.
If you want to submit this bug fix, submit to 'net' and provide an appropriate Fixes: tag.
It's no big deal so let's skip that, do you want me to resend the lot or can you just strip the stable tag when applying?
Yours, Linus Walleij
From: Linus Walleij linus.walleij@linaro.org Date: Mon, 6 Jan 2020 23:39:19 +0100
On Mon, Jan 6, 2020 at 11:01 PM David Miller davem@redhat.com wrote:
If you want to submit this bug fix, submit to 'net' and provide an appropriate Fixes: tag.
It's no big deal so let's skip that, do you want me to resend the lot or can you just strip the stable tag when applying?
Please resubmit, it helps me a lot.
Thanks.
linux-stable-mirror@lists.linaro.org