Re: [PATCH net-next] net: dsa: qca8k: Initialize the switch with correct number of ports

From: Andrew Lunn
Date: Thu Oct 24 2019 - 09:58:58 EST


On Thu, Oct 24, 2019 at 03:46:58PM +0200, Michal VokÃÄ wrote:
> Since commit 0394a63acfe2 ("net: dsa: enable and disable all ports")
> the dsa core disables all unused ports of a switch. In this case
> disabling ports with numbers higher than QCA8K_NUM_PORTS causes that
> some switch registers are overwritten with incorrect content.
>
> To fix this, initialize the dsa_switch->num_ports with correct number
> of ports.
>
> Fixes: 7e99e3470172 ("net: dsa: remove dsa_switch_alloc helper")
> Signed-off-by: Michal VokÃÄ <michal.vokac@xxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew