[PATCH net v1] net: dsa: ksz8795: use correct number of physical ports

From: Sven Van Asbroeck
Date: Thu Dec 03 2020 - 16:48:23 EST


From: Sven Van Asbroeck <thesven73@xxxxxxxxx>

The ksz8795 has five physical ports, but the driver assumes
it has only four. This prevents the driver from working correctly.

Fix by indicating the correct number of physical ports.

Fixes: e66f840c08a23 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Tested-by: Sven Van Asbroeck <thesven73@xxxxxxxxx> # ksz8795
Signed-off-by: Sven Van Asbroeck <thesven73@xxxxxxxxx>
---

Tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git # 39e367766fe1

To: Woojung Huh <woojung.huh@xxxxxxxxxxxxx>
To: Andrew Lunn <andrew@xxxxxxx>
To: Vivien Didelot <vivien.didelot@xxxxxxxxx>
To: Florian Fainelli <f.fainelli@xxxxxxxxx>
To: Vladimir Oltean <olteanv@xxxxxxxxx>
To: "David S. Miller" <davem@xxxxxxxxxxxxx>
To: Jakub Kicinski <kuba@xxxxxxxxxx>
Cc: Marek Vasut <marex@xxxxxxx>
Cc: Tristram Ha <Tristram.Ha@xxxxxxxxxxxxx>
Cc: Microchip Linux Driver Support <UNGLinuxDriver@xxxxxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx (open list)

drivers/net/dsa/microchip/ksz8795.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
index 1e101ab56cea..367cebe37ae6 100644
--- a/drivers/net/dsa/microchip/ksz8795.c
+++ b/drivers/net/dsa/microchip/ksz8795.c
@@ -1194,7 +1194,7 @@ static const struct ksz_chip_data ksz8795_switch_chips[] = {
.num_alus = 0,
.num_statics = 8,
.cpu_ports = 0x10, /* can be configured as cpu port */
- .port_cnt = 4, /* total physical port count */
+ .port_cnt = 5, /* total physical port count */
},
{
.chip_id = 0x8794,
--
2.17.1