On Thu,  3 Dec 2020 16:46:45 -0500 Sven Van Asbroeck wrote:
> From: Sven Van Asbroeck <thesve...@gmail.com>
> 
> 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 <thesve...@gmail.com> # ksz8795
> Signed-off-by: Sven Van Asbroeck <thesve...@gmail.com>

All the port counts here are -1 compared to datasheets, so I'm assuming
the are not supposed to include the host facing port or something?

Can you describe the exact problem you're trying to solve?

DSA devices are not supposed to have a netdev for the host facing port
on the switch (sorry for stating the obvious).

> 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,

Reply via email to