Commit 593f966f authored by Daniel Hellstrom's avatar Daniel Hellstrom Committed by Zheng Zengkai
Browse files

can: grcan: use ofdev->dev when allocating DMA memory

stable inclusion
from stable-v5.10.115
commit dd973c0185c5b2aec9b5a2c63c78af0e601c6a90
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5IZ9C

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dd973c0185c5b2aec9b5a2c63c78af0e601c6a90

--------------------------------

commit 101da426 upstream.

Use the device of the device tree node should be rather than the
device of the struct net_device when allocating DMA buffers.

The driver got away with it on sparc32 until commit 53b7670e
("sparc: factor the dma coherent mapping into helper") after which the
driver oopses.

Fixes: 6cec9b07 ("can: grcan: Add device driver for GRCAN and GRHCAN cores")
Link: https://lore.kernel.org/all/20220429084656.29788-2-andreas@gaisler.com


Cc: stable@vger.kernel.org
Signed-off-by: default avatarDaniel Hellstrom <daniel@gaisler.com>
Signed-off-by: default avatarAndreas Larsson <andreas@gaisler.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent d7730e0d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment