lkml.org 
[lkml]   [2019]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next] net: dsa: qca8k: Initialize the switch with correct number of ports
From
Date
On 10/24/19 7:12 AM, Andrew Lunn wrote:
> 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.
>
> Humm.
>
> The same problem might exist in other drivers:
>
> linux/drivers/net/dsa$ grep -r "ds->num_ports = DSA_MAX_PORTS"
> qca8k.c: priv->ds->num_ports = DSA_MAX_PORTS;
> b53/b53_common.c: ds->num_ports = DSA_MAX_PORTS;

Not for b53 because this later gets clamped with dev->num_ports in
b53_setup().

> mt7530.c: priv->ds->num_ports = DSA_MAX_PORTS;
> microchip/ksz_common.c: ds->num_ports = DSA_MAX_PORTS;
> dsa_loop.c: ds->num_ports = DSA_MAX_PORTS;
>
> dsa_loop.c looks O.K, it does support DSA_MAX_PORTS ports.
>
> But the others?
>
> Andrew
>


--
Florian

\
 
 \ /
  Last update: 2019-10-24 18:40    [W:0.058 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site