]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: renesas: rswitch: Fix timestamp feature after all descriptors are used
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 8 Jun 2023 01:57:27 +0000 (10:57 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:02:14 +0000 (16:02 +0200)
commit9a1d99918f33ec06b1e76a23f04df81957a2ba56
tree62883ea5fc4aa829d32f653a5d06c6ffcb39fd4f
parent3dcabbdb00d1e431b3579b7eaaadc5f3f504a6c4
net: renesas: rswitch: Fix timestamp feature after all descriptors are used

[ Upstream commit 0ad4982c520ed87ea7ebfc9381ea1f617ed75364 ]

The timestamp descriptors were intended to act cyclically. Descriptors
from index 0 through gq->ring_size - 1 contain actual information, and
the last index (gq->ring_size) should have LINKFIX to indicate
the first index 0 descriptor. However, the LINKFIX value is missing,
causing the timestamp feature to stop after all descriptors are used.
To resolve this issue, set the LINKFIX to the timestamp descritors.

Reported-by: Phong Hoang <phong.hoang.wz@renesas.com>
Fixes: 33f5d733b589 ("net: renesas: rswitch: Improve TX timestamp accuracy")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/renesas/rswitch.c