lkml.org 
[lkml]   [2020]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net v1] net: dsa: ksz8795: use correct number of physical ports
On Thu,  3 Dec 2020 16:46:45 -0500 Sven Van Asbroeck wrote:
> From: Sven Van Asbroeck <thesven73@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 <thesven73@gmail.com> # ksz8795
> Signed-off-by: Sven Van Asbroeck <thesven73@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,

\
 
 \ /
  Last update: 2020-12-05 00:29    [W:0.050 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site