]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: stmmac: re-init rx buffers when mac resume back
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Thu, 25 Feb 2021 09:01:14 +0000 (17:01 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Feb 2021 23:17:12 +0000 (15:17 -0800)
commit9c63faaa931e443e7abbbee9de0169f1d4710546
tree6e24b9aa7b89d32909823fab956a5208760d6f81
parent396e13e11577b614db77db0bbb6fca935b94eb1b
net: stmmac: re-init rx buffers when mac resume back

During suspend/resume stress test, we found descriptor write back by DMA
could exhibit unusual behavior, e.g.:
003 [0xc4310030]: 0x0 0x40 0x0 0xb5010040

We can see that desc3 write back is 0xb5010040, it is still ownd by DMA,
so application would not recycle this buffer. It will trigger fatal bus
error when DMA try to use this descriptor again. To fix this issue, we
should re-init all rx buffers when mac resume back.

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