]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: stmmac: move stmmac_xmit() skb head handling
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Fri, 20 Mar 2026 16:47:12 +0000 (16:47 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 24 Mar 2026 11:08:25 +0000 (12:08 +0100)
commitfcbf106189aaf69a2a2f6116672d442d473ecbcd
tree5fbcc9a5b67d3ce8db0d50fc9312992bfa02ca39
parenta41a5733e71ac103ca8a045539f7b56050dae75a
net: stmmac: move stmmac_xmit() skb head handling

The skb head buffer handling is delayed in stmmac_xmit() until after
the skb fragments have been populated into the descriptors. The reason
is this code used to set the OWN bit on the first descriptor, which
then allows the TX DMA to process the first and subsequent descriptors.
However, as of commit 579a25a854d4 ("net: stmmac: Initial support for
TBS") this is now separated, but the comments weren't updated.

Move the code populating the first descriptor along side the jumbo code
which also populates the first descriptor. This gives a consistent
location where we populate the descriptor(s) for the SKB head.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1w3d0C-0000000DfLj-0BLb@rmk-PC.armlinux.org.uk
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c