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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 28 May 2016 20:27:09 +0200
From:	Andrew Lunn <andrew@...n.ch>
To:	Hauke Mehrtens <hauke@...ke-m.de>
Cc:	f.fainelli@...il.com, alexander.stein@...tec-electronic.com,
	netdev@...r.kernel.org, john@...ozen.org, openwrt@...sin.me,
	hauke.mehrtens@...el.com, daniel.schwierzeck@...il.com,
	eckert.florian@...glemail.com
Subject: Re: [RFC v2 2/2] NET: PHY: lantiq: add LED configuration support

On Sat, May 28, 2016 at 06:59:01PM +0200, Hauke Mehrtens wrote:
> This makes it possible to configure the behavior of the LEDs connected
> to a PHY. The LEDs are controlled by the chip, this makes it possible
> to configure the behavior when the hardware should activate and
> deactivate the LEDs.
> 
> Signed-off-by: Hauke Mehrtens <hauke@...ke-m.de>

Hi Hauke

This is interesting. But you definitely needs to Cc: the device tree
list.

It would also be good to see basic implementations for other PHYs, so
we know the binding is generic enough.

> +LED configuration for Ethernet phys
> +
> +Property names:
> +	led-const-on: conditions the LED should be constant on
> +	led-pules: condition the LED should be pulsed on
> +	led-blink-slow: condition the LED should slowly blink
> +	led-blink-fast: condition the LED should fast blink

A binding should make it clear if properties are required or optional.

led-pulse, not led-pules.

These properties also seem to be mutually exclusive. How can it be
constantly on, yet blink? You need better descriptions.

> +property values:
> +	PHY_LED_OFF:		LED is off
> +	PHY_LED_LINK10:		link is 10MBit/s
> +	PHY_LED_LINK100:	link is 100MBit/s
> +	PHY_LED_LINK1000:	link is 1000MBit/s
> +	PHY_LED_PDOWN:		link is powered down
> +	PHY_LED_EEE:		link is in EEE mode
> +	PHY_LED_ANEG:		auto negotiation is running
> +	PHY_LED_ABIST:		analog self testing is running
> +	PHY_LED_CDIAG:		cable diagnostics is running
> +	PHY_LED_COPPER:		copper interface detected
> +	PHY_LED_FIBER:		fiber interface detected
> +	PHY_LED_TXACT:		Transmit activity
> +	PHY_LED_RXACT:		Receive activity
> +	PHY_LED_COL:		Collision

There should be a comment that not all PHYs implement all values, or
even all properties. And some PHYS will accept an ORed list of
properties, where as other will only accept a single value.

And there should be a comment to look at the binding document for the
specific PHY for what it supports. And you need such a document for
the lantiq.

Maybe some of the implementation should be pushed into the phylib.
phy_probe() already looks for the max-speed property, so it could also
parse these properties and call a function in the phy_driver
structure.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ