diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2021-10-17 16:56:46 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-18 14:22:28 +0100 |
commit | 06dd34a628ae5b6a839b757e746de165d6789ca8 (patch) | |
tree | c139c5d73a2001f19643ae3372a9b98931b62253 /drivers/net/dsa/qca8k.c | |
parent | 7adaf56edd03751badc3f045e664e30f9d1b195e (diff) | |
download | linux-06dd34a628ae5b6a839b757e746de165d6789ca8.tar.gz linux-06dd34a628ae5b6a839b757e746de165d6789ca8.tar.bz2 linux-06dd34a628ae5b6a839b757e746de165d6789ca8.zip |
net: dsa: qca8k: fix delay applied to wrong cpu in parse_port_config
Fix delay settings applied to wrong cpu in parse_port_config. The delay
values is set to the wrong index as the cpu_port_index is incremented
too early. Start the cpu_port_index to -1 so the correct value is
applied to address also the case with invalid phy mode and not available
port.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/qca8k.c')
-rw-r--r-- | drivers/net/dsa/qca8k.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index bf58d4d1ae9b..0992790da6b6 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -976,7 +976,7 @@ qca8k_setup_of_pws_reg(struct qca8k_priv *priv) static int qca8k_parse_port_config(struct qca8k_priv *priv) { - int port, cpu_port_index = 0, ret; + int port, cpu_port_index = -1, ret; struct device_node *port_dn; phy_interface_t mode; struct dsa_port *dp; |