]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "net: dsa: move sja1110_process_meta_tstamp inside the tagging protocol driver"
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 9 Dec 2021 23:34:45 +0000 (01:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Dec 2021 12:51:34 +0000 (12:51 +0000)
commit231be79b90fc333cb5e847ebcdd227fab890888f
tree7323f18ed1f58933c82509161272be234d0a981c
parent5b54f68041aeeec6e7fd09c38c0c7e9737f18f29
Revert "net: dsa: move sja1110_process_meta_tstamp inside the tagging protocol driver"

This reverts commit ca872dc3180912159155bd2f7321e0a836542103.

The above change was done to avoid calling symbols exported by the
switch driver from the tagging protocol driver.

With the tagger-owned storage model, we have a new option on our hands,
and that is for the switch driver to provide a data consumer handler in
the form of a function pointer inside the ->connect_tag_protocol()
method. Having a function pointer avoids the problems of the exported
symbols approach.

By creating a handler for metadata frames holding TX timestamps on
SJA1110, we are able to eliminate an skb queue from the tagger data, and
replace it with a simple, and stateless, function pointer. This skb
queue is now handled exclusively by sja1105_ptp.c, which makes the code
easier to follow, as it used to be before the reverted patch.

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