]> git.baikalelectronics.ru Git - uboot.git/commit
net: designware: fix tx packet length
authorSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Sat, 17 Nov 2018 09:24:41 +0000 (10:24 +0100)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 24 Jan 2019 17:35:27 +0000 (11:35 -0600)
commitaa13cea982a348664a6a7a7db870b4a885ba6659
treeb006e57412be91ab9d5ecd00295bf6d369f43ea6
parentdd9fd4e74c626ff7ad8f8227b32a44a746a69aa2
net: designware: fix tx packet length

The designware driver has a bug in setting the tx length into the dma
descriptor: it always or's the length into the descriptor without
zeroing out the length mask before.

This results in occasional packets being transmitted with a length
greater than they should be (trailer). Due to the nature of Ethernet
allowing such a trailer, most packets seem to be parsed fine by remote
hosts, which is probably why this hasn't been noticed.

Fix this by correctly clearing the size mask before setting the new
length.

Tested on socfpga gen5.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
drivers/net/designware.c