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: <dj6vmcezdfrrhdofhzt4gs42pzqyd5fntdy66z76oajxvc44p4@k7fd7dhtwqos>
Date: Tue, 22 Oct 2024 08:09:37 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Daniel Machon <daniel.machon@...rochip.com>
Cc: "David S. Miller" <davem@...emloft.net>, 
	Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, andrew@...n.ch, Lars Povlsen <lars.povlsen@...rochip.com>, 
	Steen Hegelund <Steen.Hegelund@...rochip.com>, horatiu.vultur@...rochip.com, 
	jensemil.schulzostergaard@...rochip.com, Parthiban.Veerasooran@...rochip.com, 
	Raju.Lakkaraju@...rochip.com, UNGLinuxDriver@...rochip.com, 
	Richard Cochran <richardcochran@...il.com>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, jacob.e.keller@...el.com, 
	ast@...erby.net, maxime.chevallier@...tlin.com, netdev@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH net-next 14/15] net: sparx5: add compatible strings for
 lan969x and verify the target

On Mon, Oct 21, 2024 at 03:58:51PM +0200, Daniel Machon wrote:
> @@ -227,6 +229,168 @@ bool is_sparx5(struct sparx5 *sparx5)
>  	}
>  }
>  
> +/* Set the devicetree target based on the compatible string */
> +static int sparx5_set_target_dt(struct sparx5 *sparx5)
> +{
> +	struct device_node *node = sparx5->pdev->dev.of_node;
> +
> +	if (is_sparx5(sparx5))
> +		/* For Sparx5 the devicetree target is always the chip target */
> +		sparx5->target_dt = sparx5->target_ct;
> +	else if (of_device_is_compatible(node, "microchip,lan9691-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9691VAO;
> +	else if (of_device_is_compatible(node, "microchip,lan9692-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9692VAO;
> +	else if (of_device_is_compatible(node, "microchip,lan9693-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9693VAO;
> +	else if (of_device_is_compatible(node, "microchip,lan9694-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9694;
> +	else if (of_device_is_compatible(node, "microchip,lan9695-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9694TSN;
> +	else if (of_device_is_compatible(node, "microchip,lan9696-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9696;
> +	else if (of_device_is_compatible(node, "microchip,lan9697-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9696TSN;
> +	else if (of_device_is_compatible(node, "microchip,lan9698-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9698;
> +	else if (of_device_is_compatible(node, "microchip,lan9699-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9698TSN;
> +	else if (of_device_is_compatible(node, "microchip,lan969a-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9694RED;
> +	else if (of_device_is_compatible(node, "microchip,lan969b-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9696RED;
> +	else if (of_device_is_compatible(node, "microchip,lan969c-switch"))
> +		sparx5->target_dt = SPX5_TARGET_CT_LAN9698RED;

Do not re-implement match data.

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ