summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2019-10-25 13:47:24 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-10 11:25:25 +0100
commit52fb9ecc3bb93cec8f309d5c7cdd201c3ba8cab1 (patch)
tree324c05e90b0ed242c2d588b77e887c0352e643e8 /include/net
parent78c5ddd6aec86aa79f8d7261c54fc01993486478 (diff)
net: ethernet: ftgmac100: Fix DMA coherency issue with SW checksum
[ Upstream commit 88824e3bf29a2fcacfd9ebbfe03063649f0f3254 ] We are calling the checksum helper after the dma_map_single() call to map the packet. This is incorrect as the checksumming code will touch the packet from the CPU. This means the cache won't be properly flushes (or the bounce buffering will leave us with the unmodified packet to DMA). This moves the calculation of the checksum & vlan tags to before the DMA mapping. This also has the side effect of fixing another bug: If the checksum helper fails, we goto "drop" to drop the packet, which will not unmap the DMA mapping. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Fixes: 05690d633f30 ("ftgmac100: Upgrade to NETIF_F_HW_CSUM") Reviewed-by: Vijay Khemka <vijaykhemka@fb.com> Tested-by: Vijay Khemka <vijaykhemka@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions