net: dsa: qca8k: fix internal delay applied to the wrong PAD config
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 19 Nov 2021 02:03:49 +0000 (03:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Nov 2021 12:34:37 +0000 (12:34 +0000)
commit3b00a07c2443745d62babfe08dbb2ad8e649526e
treef58911fd68f94f8f833fd8877956a8ce0c60575e
parentf9390b249c90a15a4d9e69fbfb7a53c860b1fcaf
net: dsa: qca8k: fix internal delay applied to the wrong PAD config

With SGMII phy the internal delay is always applied to the PAD0 config.
This is caused by the falling edge configuration that hardcode the reg
to PAD0 (as the falling edge bits are present only in PAD0 reg)
Move the delay configuration before the reg overwrite to correctly apply
the delay.

Fixes: cef08115846e ("net: dsa: qca8k: set internal delay also for sgmii")
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c