• Vladimir Oltean's avatar
    net: enetc: implement software lockstep for port MAC registers · 12717dec
    Vladimir Oltean authored
    Currently the enetc driver duplicates its writes to the PM0 registers
    also to PM1, but it doesn't do this consistently - for example we write
    to ENETC_PM0_MAXFRM but not to ENETC_PM1_MAXFRM.
    
    Create enetc_port_mac_wr() which writes both the PM0 and PM1 register
    with the same value (if frame preemption is supported on this port).
    Also create enetc_port_mac_rd() which reads from PM0 - the assumption
    being that PM1 contains just the same value.
    
    This will be necessary when we enable the MAC Merge layer properly, and
    the pMAC becomes operational.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    12717dec
enetc.h 14.9 KB