]> git.ipfire.org Git - thirdparty/qemu.git/commit
dp8393x: Don't clobber packet checksum
authorFinn Thain <fthain@telegraphics.com.au>
Wed, 29 Jan 2020 09:27:49 +0000 (20:27 +1100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 2 Jun 2020 15:40:21 +0000 (10:40 -0500)
commitd50aa8acbc6f4bd83d0d0b5958d49ac6baf254a5
treeb8b018f6a844748ad9c95dc0284b5fa7d4e971e8
parent3a8068f4ebb9f9500cf3d1805f5cfbd42e15ab12
dp8393x: Don't clobber packet checksum

A received packet consumes pkt_size bytes in the buffer and the frame
checksum that's appended to it consumes another 4 bytes. The Receive
Buffer Address register takes the former quantity into account but
not the latter. So the next packet written to the buffer overwrites
the frame checksum. Fix this.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit bae112b80c9c42cea21ee7623c283668c3451c2e)
*drop context dep. on 19f70347731
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/net/dp8393x.c