]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: bump tc when get underflow error from DMA descriptor
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>
Wed, 8 Dec 2021 10:06:51 +0000 (18:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Dec 2021 12:20:35 +0000 (12:20 +0000)
commita4fe6cedfbd301cf7a1e2c2ee5e8bcce8c61160b
tree2a5a083867c3e3509999ad3f02ab96cd7d5442f4
parent7710b5dfbbcc5012c91b842ae38eefc3964b2cc5
net: stmmac: bump tc when get underflow error from DMA descriptor

In DMA threshold mode, frame underflow errors may sometimes occur when
the TC(threshold control) value is not enough. The TC value need to be
bumped up in this case.

There is no underflow interrupt bit on DMA_CH(#i)_Status of dwmac4, so
the DMA threshold cannot be bumped up in stmmac_dma_interrupt(). The
i.mx8mp board observed an underflow error while running NFS boot, the
NFS rootfs could not be mounted.

The underflow error can be got from the DMA descriptor TDES3 on dwmac4.
This patch bump up tc value once underflow error is got from TDES3.

Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/common.h
drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c