]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: move ts_id from sja1105_tagger_data
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 9 Dec 2021 23:34:43 +0000 (01:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Dec 2021 12:51:33 +0000 (12:51 +0000)
commitc6b548a253f2eb6fdf44cfd79ee90ddc3a7d0bd5
tree6ac48e901ccbccf6791ca9c78d6ae306f4f2e437
parent47e44e971480c557ab3a17115ec03c43b7de1ab2
net: dsa: sja1105: move ts_id from sja1105_tagger_data

The TX timestamp ID is incremented by the SJA1110 PTP timestamping
callback (->port_tx_timestamp) for every packet, when cloning it.
It isn't used by the tagger at all, even though it sits inside the
struct sja1105_tagger_data.

Also, serialization to this structure is currently done through
tagger_data->meta_lock, which is a cheap hack because the meta_lock
isn't used for anything else on SJA1110 (sja1105_rcv_meta_state_machine
isn't called).

This change moves ts_id from sja1105_tagger_data to sja1105_private and
introduces a dedicated spinlock for it, also in sja1105_private.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105.h
drivers/net/dsa/sja1105/sja1105_main.c
drivers/net/dsa/sja1105/sja1105_ptp.c
include/linux/dsa/sja1105.h