OSDN Git Service

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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Jun 2023 09:41:09 +0000 (10:41 +0100)
commit0ad4982c520ed87ea7ebfc9381ea1f617ed75364
treeb97f6e58d890b191599b0463e19483764c18e99a
parent6c02568fd1ae53099b4ab86365c5be1ff15f586b
net: renesas: rswitch: Fix timestamp feature after all descriptors are used

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>
drivers/net/ethernet/renesas/rswitch.c