net: stmmac: fix dma physical address of descriptor when display ring
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Thu, 25 Feb 2021 09:01:12 +0000 (17:01 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Feb 2021 23:17:11 +0000 (15:17 -0800)
commitbfaf91ca848e758ed7be99b61fd936d03819fa56
tree4513cfedef7ad383df99a4c1ad15195ba980e71a
parentc511819d138de38e1637eedb645c207e09680d0f
net: stmmac: fix dma physical address of descriptor when display ring

Driver uses dma_alloc_coherent to allocate dma memory for descriptors,
dma_alloc_coherent will return both the virtual address and physical
address. AFAIK, virt_to_phys could not convert virtual address to
physical address, for which memory is allocated by dma_alloc_coherent.

dwmac4_display_ring() function is broken for various descriptor, it only
support normal descriptor(struct dma_desc) now, this patch also extends to
support all descriptor types.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
drivers/net/ethernet/stmicro/stmmac/enh_desc.c
drivers/net/ethernet/stmicro/stmmac/hwif.h
drivers/net/ethernet/stmicro/stmmac/norm_desc.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c