]> git.baikalelectronics.ru Git - kernel.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)
commit03eef467327edb3b238847482202991c86a79517
tree6e24b9aa7b89d32909823fab956a5208760d6f81
parent261f9f95a02afabc0de0edb17b80ddb65dfac389
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