• Vladimir Oltean's avatar
    net: dsa: felix: unconditionally configure MAC speed to 1000Mbps · da1c4ba1
    Vladimir Oltean authored
    In VSC9959, the PCS is the one who performs rate adaptation (symbol
    duplication) to the speed negotiated by the PHY. The MAC is unaware of
    that and must remain configured for gigabit. If it is configured at
    OCELOT_SPEED_10 or OCELOT_SPEED_100, it'll start transmitting PAUSE
    frames out of control and never recover, _even if_ we then reconfigure
    it at OCELOT_SPEED_1000 afterwards.
    
    This patch fixes a bug that luckily did not have any functional impact.
    We were writing 10, 100, 1000 etc into this 2-bit field in
    DEV_CLOCK_CFG, but the hardware expects values in the range 0, 1, 2, 3.
    So all speed values were getting truncated to 0, which is
    OCELOT_SPEED_2500, and which also appears to be fine.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    da1c4ba1
felix.c 25 KB