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] [day] [month] [year] [list]
Message-ID: 
 <PH0PR18MB4474CE8F239C66F349F043E1DEED2@PH0PR18MB4474.namprd18.prod.outlook.com>
Date: Thu, 16 May 2024 07:28:07 +0000
From: Hariprasad Kelam <hkelam@...vell.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>,
        "David S. Miller"
	<davem@...emloft.net>, Andrew Lunn <andrew@...n.ch>,
        Eric Dumazet
	<edumazet@...gle.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Jakub
 Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
        Vladimir Oltean
	<olteanv@...il.com>,
        Woojung Huh <woojung.huh@...rochip.com>,
        Arun Ramadoss
	<arun.ramadoss@...rochip.com>
CC: "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
        David Ahern
	<dsahern@...nel.org>, Simon Horman <horms@...nel.org>,
        Willem de Bruijn
	<willemb@...gle.com>,
        Søren Andersen <san@...v.dk>
Subject: [PATCH net v1 1/1] net: dsa: microchip: Correct initialization order
 for KSZ88x3 ports



> Adjust the initialization sequence of KSZ88x3 switches to enable 802.1p
> priority control on Port 2 before configuring Port 1. This change ensures the
> apptrust functionality on Port 1 operates correctly, as it depends on the
> priority settings of Port 2. The prior initialization sequence incorrectly
> configured Port 1 first, which could lead to functional discrepancies.
> 
> Fixes: a1ea57710c9d ("net: dsa: microchip: dcb: add special handling for
> KSZ88X3 family")
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
> ---
>  drivers/net/dsa/microchip/ksz_dcb.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/net/dsa/microchip/ksz_dcb.c
> b/drivers/net/dsa/microchip/ksz_dcb.c
> index a971063275629..19b228b849247 100644
> --- a/drivers/net/dsa/microchip/ksz_dcb.c
> +++ b/drivers/net/dsa/microchip/ksz_dcb.c
> @@ -805,5 +805,18 @@ int ksz_dcb_init(struct ksz_device *dev)
>  	if (ret)
>  		return ret;
> 
> +	/* Enable 802.1p priority control on Port 2 during switch initialization.
> +	 * This setup is critical for the apptrust functionality on Port 1, which
> +	 * relies on the priority settings of Port 2. Note: Port 1 is naturally
> +	 * configured before Port 2, necessitating this configuration order.
> +	 */
> +	if (ksz_is_ksz88x3(dev)) {
> +		ret = ksz_prmw8(dev, KSZ_PORT_2,
Nit :  instead, just call return ksz_prmw8();
Reviewed-by: Hariprasad Kelam <hkelam@...vell.com>



> KSZ8_REG_PORT_1_CTRL_0,
> +				KSZ8_PORT_802_1P_ENABLE,
> +				KSZ8_PORT_802_1P_ENABLE);
> +		if (ret)
> +			return ret;

Thanks,
Hariprasad k
> +	}
> +
>  	return 0;
>  }
> --
> 2.39.2
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ