]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dp83640: Fix tx timestamp overflow handling.
authorManfred Rudigier <Manfred.Rudigier@omicron.at>
Wed, 20 Jan 2016 10:22:28 +0000 (11:22 +0100)
committerJiri Slaby <jslaby@suse.cz>
Wed, 2 Mar 2016 11:51:33 +0000 (12:51 +0100)
commit5e67dbf09bb4dc9c7745e1d94d67e9e857d1ff7c
treed88ead50531775ae52936aeb6e7dfcb978e7eb02
parent28103f2f1fb676a2b305ed6e15f83a8a84906d45
net: dp83640: Fix tx timestamp overflow handling.

[ Upstream commit 81e8f2e930fe76b9814c71b9d87c30760b5eb705 ]

PHY status frames are not reliable, the PHY may not be able to send them
during heavy receive traffic. This overflow condition is signaled by the
PHY in the next status frame, but the driver did not make use of it.
Instead it always reported wrong tx timestamps to user space after an
overflow happened because it assigned newly received tx timestamps to old
packets in the queue.

This commit fixes this issue by clearing the tx timestamp queue every time
an overflow happens, so that no timestamps are delivered for overflow
packets. This way time stamping will continue correctly after an overflow.

Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/phy/dp83640.c