diff options
author | Matthias Schiffer <matthias.schiffer@ew.tq-group.com> | 2020-09-16 12:08:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-17 02:46:09 +0200 |
commit | fd944dc24336922656a48f4608bfb41abdcdc4aa (patch) | |
tree | cb648b679e78bf161edc508ba43f62137bb4581b /drivers/net | |
parent | geneve: add transport ports in route lookup for geneve (diff) | |
download | linux-fd944dc24336922656a48f4608bfb41abdcdc4aa.tar.xz linux-fd944dc24336922656a48f4608bfb41abdcdc4aa.zip |
net: dsa: microchip: ksz8795: really set the correct number of ports
The KSZ9477 and KSZ8795 use the port_cnt field differently: For the
KSZ9477, it includes the CPU port(s), while for the KSZ8795, it doesn't.
It would be a good cleanup to make the handling of both drivers match,
but as a first step, fix the recently broken assignment of num_ports in
the KSZ8795 driver (which completely broke probing, as the CPU port
index was always failing the num_ports check).
Fixes: af199a1a9cb0 ("net: dsa: microchip: set the correct number of ports")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/dsa/microchip/ksz8795.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c index f7d59d7b2cbe..f5779e152377 100644 --- a/drivers/net/dsa/microchip/ksz8795.c +++ b/drivers/net/dsa/microchip/ksz8795.c @@ -1260,7 +1260,7 @@ static int ksz8795_switch_init(struct ksz_device *dev) } /* set the real number of ports */ - dev->ds->num_ports = dev->port_cnt; + dev->ds->num_ports = dev->port_cnt + 1; return 0; } |