]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: Fixup the tail addr setting in xmit path
authorJose Abreu <Jose.Abreu@synopsys.com>
Mon, 17 Sep 2018 08:22:57 +0000 (09:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Sep 2018 02:48:08 +0000 (19:48 -0700)
commitc9429b890e281022ae89670eb92e15dd3d2b7bd9
tree9c02d06532e3cae7644f61a93945ee03be085a68
parentd2d5eebd9e0f75c1a4c94a004fbd577939c8d107
net: stmmac: Fixup the tail addr setting in xmit path

Currently we are always setting the tail address of descriptor list to
the end of the pre-allocated list.

According to databook this is not correct. Tail address should point to
the last available descriptor + 1, which means we have to update the
tail address everytime we call the xmit function.

This should make no impact in older versions of MAC but in newer
versions there are some DMA features which allows the IP to fetch
descriptors in advance and in a non sequential order so its critical
that we set the tail address correctly.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Fixes: 601960c3588f ("stmmac: support new GMAC4")
Cc: David S. Miller <davem@davemloft.net>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c