]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: ti: cpts: move enable/disable flags outside of cpts module
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Mon, 12 Nov 2018 14:00:22 +0000 (16:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Nov 2018 00:29:59 +0000 (16:29 -0800)
commit44090c1abd0d7072316e36711af032af268c1a12
treee445f6c5f9dffcb954913bbc6c2961aca9f4c8c0
parent1e2169c85a7a9ccf84f6935332d0f01c5a6aa882
net: ethernet: ti: cpts: move enable/disable flags outside of cpts module

Each slave has it's own receive timestamp filter. But cpts rx/tx
timestamp enable flags are used to allow ts retrieve only for one
user. This limitation causes data path redundancy and setting overlap
if cpsw module is in dual-mac mode for instance.

If rx ts is enabled only for one port - the second interface must expect
every incoming packet to be PTP packet w/o absolutely any reason, and if
it's PTP - do unneeded stuff, as rx filter for second port is not set
and cpts fifo is not supposed to contain appropriate ts event.
That's not correct.

So, to fix control overlap and avoid redundant CPU cycles, the patch
splits rx/tx ts enable flags between network devices. After the patch,
PTP timestamping still should be used for only one port (or PTP id
counter has to be different for both ports as cpts IP is common).

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c
drivers/net/ethernet/ti/cpts.c
drivers/net/ethernet/ti/cpts.h
drivers/net/ethernet/ti/netcp_ethss.c