lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+h21hoCaT3DpTGgN8Og98P98tUvPS8-zMKWtVxpyObCe30NvQ@mail.gmail.com>
Date:   Mon, 25 Nov 2019 12:10:41 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Oleksij Rempel <o.rempel@...gutronix.de>
Cc:     mkl@...gutronix.de, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>, kernel@...gutronix.de,
        netdev <netdev@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>, david@...tonic.nl
Subject: Re: [PATCH v1 2/2] net: dsa: sja1105: fix sja1105_parse_rgmii_delays()

On Mon, 25 Nov 2019 at 12:03, Oleksij Rempel <o.rempel@...gutronix.de> wrote:
>
> This function was using configuration of port 0 in devicetree for all ports.
> In case CPU port was not 0, the delay settings was ignored. This resulted not
> working communication between CPU and the switch.
>
> Fixes: f5b8631c293b ("net: dsa: sja1105: Error out if RGMII delays are requested in DT")
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
> ---

Reviewed-by: Vladimir Oltean <olteanv@...il.com>

>  drivers/net/dsa/sja1105/sja1105_main.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
> index 1238fd68b2cd..34544b1c30dc 100644
> --- a/drivers/net/dsa/sja1105/sja1105_main.c
> +++ b/drivers/net/dsa/sja1105/sja1105_main.c
> @@ -594,15 +594,15 @@ static int sja1105_parse_rgmii_delays(struct sja1105_private *priv,
>         int i;
>
>         for (i = 0; i < SJA1105_NUM_PORTS; i++) {
> -               if (ports->role == XMII_MAC)
> +               if (ports[i].role == XMII_MAC)
>                         continue;
>
> -               if (ports->phy_mode == PHY_INTERFACE_MODE_RGMII_RXID ||
> -                   ports->phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
> +               if (ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_RXID ||
> +                   ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
>                         priv->rgmii_rx_delay[i] = true;
>
> -               if (ports->phy_mode == PHY_INTERFACE_MODE_RGMII_TXID ||
> -                   ports->phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
> +               if (ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_TXID ||
> +                   ports[i].phy_mode == PHY_INTERFACE_MODE_RGMII_ID)
>                         priv->rgmii_tx_delay[i] = true;
>
>                 if ((priv->rgmii_rx_delay[i] || priv->rgmii_tx_delay[i]) &&
> --
> 2.24.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ