net: ethernet: ixp4xx: Set the DMA masks explicitly
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 18 Apr 2021 18:28:53 +0000 (20:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Apr 2021 22:47:56 +0000 (15:47 -0700)
commit8d892d60941b00c86d2029c8a99db24ab4979673
tree8bea4781f52df41b32006c6ca6c385c0c11ec34c
parented8157f1ebf1ae81a8fa2653e3f20d2076fad1c9
net: ethernet: ixp4xx: Set the DMA masks explicitly

The former fix only papered over the actual problem: the
ethernet core expects the netdev .dev member to have the
proper DMA masks set, or there will be BUG_ON() triggered
in kernel/dma/mapping.c.

Fix this by simply copying dma_mask and dma_mask_coherent
from the parent device.

Fixes: e45d0fad4a5f ("net: ethernet: ixp4xx: Use parent dev for DMA pool")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xscale/ixp4xx_eth.c