]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: hide status block before TX timestamping
authorJonathan Lemon <jonathan.lemon@gmail.com>
Sun, 24 Apr 2022 16:53:07 +0000 (09:53 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 26 Apr 2022 08:45:46 +0000 (10:45 +0200)
commit12763a281187efa46c23fbff2e0110159231ca6d
treee729f72489f1b9c90df08fd5cd71b01cf1fda815
parent6130e9da1399925c82f7e0ae977175b18f6a2598
net: bcmgenet: hide status block before TX timestamping

The hardware checksum offloading requires use of a transmit
status block inserted before the outgoing frame data, this was
updated in '81ecb1ecd3a2 ("net: bcmgenet: always enable status blocks")'

However, skb_tx_timestamp() assumes that it is passed a raw frame
and PTP parsing chokes on this status block.

Fix this by calling __skb_pull(), which hides the TSB before calling
skb_tx_timestamp(), so an outgoing PTP packet is parsed correctly.

As the data in the skb has already been set up for DMA, and the
dma_unmap_* calls use a separately stored address, there is no
no effective change in the data transmission.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220424165307.591145-1-jonathan.lemon@gmail.com
Fixes: 7b85cc23e2e6 ("net: bcmgenet: add skb_tx_timestamp call")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/broadcom/genet/bcmgenet.c