• Ivan Khoronzhuk's avatar
    net: ethernet: ti: cpts: move enable/disable flags outside of cpts module · a9423120
    Ivan Khoronzhuk authored
    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: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a9423120
cpsw.c 99.5 KB