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: <0a1809ad-a279-48d2-a7e6-8bab1111fb7a@lunn.ch>
Date: Mon, 30 Sep 2024 16:47:05 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Florian Fainelli <f.fainelli@...il.com>,
	Vladimir Oltean <olteanv@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Christian Marangi <ansuelsmth@...il.com>,
	Tim Harvey <tharvey@...eworks.com>, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3] net: dsa: mv88e6xxx: Support LED control

> @@ -5396,6 +5426,7 @@ static const struct mv88e6xxx_ops mv88e6352_ops = {
>  	.port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit,
>  	.port_disable_pri_override = mv88e6xxx_port_disable_pri_override,
>  	.port_get_cmode = mv88e6352_port_get_cmode,
> +	.port_setup_leds = mv88e6xxx_port_setup_leds,
>  	.port_setup_message_port = mv88e6xxx_setup_message_port,
>  	.stats_snapshot = mv88e6320_g1_stats_snapshot,
>  	.stats_set_histogram = mv88e6095_g1_stats_set_histogram,

This code should work for all members of the 6352 family: 6172 6176
6240 6352. Please add this op to them all.

> +static int mv88e6xxx_led_match_selector(struct mv88e6xxx_port *p, int led, bool blink_activity,
> +					bool fiber, unsigned long rules, u16 *selector)
> +{
> +	const struct mv88e6xxx_led_hwconfig *conf;
> +	int i;
> +
> +	/* No rules means we turn the LED off */
> +	if (!rules) {
> +		if (led == 1)
> +			*selector |= MV88E6XXX_PORT_LED_CONTROL_LED1_SELE;
> +		else
> +			*selector |= MV88E6XXX_PORT_LED_CONTROL_LED0_SELE;
> +		return 0;
> +	}
> +
> +	/* TODO: these rules are for MV88E6352, when adding other families,
> +	 * think abour making sure you select the table that match the

about

> --- a/drivers/net/dsa/mv88e6xxx/port.c
> +++ b/drivers/net/dsa/mv88e6xxx/port.c
> @@ -12,6 +12,7 @@
>  #include <linux/if_bridge.h>
>  #include <linux/phy.h>
>  #include <linux/phylink.h>
> +#include <linux/property.h>
>  
>  #include "chip.h"
>  #include "global2.h"
> diff --git a/drivers/net/dsa/mv88e6xxx/port.h b/drivers/net/dsa/mv88e6xxx/port.h

I suspect that additional include is not needed, since there are no
other changes to port.c

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ