]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:19 +0000 (09:16 +0200)
commit5e7bb38dc696b672b75de0539a75e776f023fe9b
tree05ebb55c72fefd818544bfbea784459aa6f51460
parent7976e6b70ecf1c9d592d597a7e9292aa8ad9e3fc
net: stmmac: Fixup the tail addr setting in xmit path

[ Upstream commit 0431100b3d82c509729ece1ab22ada2484e209c1 ]

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: f748be531d70 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c