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: <bb146832-30fc-4c76-a083-51a1bc087e61@lunn.ch>
Date: Sat, 11 May 2024 01:58:13 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Daniel Golle <daniel@...rotopia.org>
Cc: Christian Marangi <ansuelsmth@...il.com>, Pavel Machek <pavel@....cz>,
	Lee Jones <lee@...nel.org>, Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	William Zhang <william.zhang@...adcom.com>,
	Anand Gore <anand.gore@...adcom.com>,
	Kursad Oney <kursad.oney@...adcom.com>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	Rafał Miłecki <rafal@...ecki.pl>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	Jacek Anaszewski <jacek.anaszewski@...il.com>,
	Fernández Rojas <noltari@...il.com>,
	Sven Schwermer <sven.schwermer@...ruptive-technologies.com>,
	linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	netdev@...r.kernel.org
Subject: Re: [net-next PATCH v10 3/5] net: phy: add support for PHY LEDs
 polarity modes

> Wanting to make use of this I noticed that polarity settings are only
> applied once in of_phy_led(), which is not sufficient for my use-case:
> 
> I'm writing a LED driver for Aquantia PHYs and those PHYs reset the
> polarity mode every time a PHY reset is triggered.
> 
> I ended up writing the patch below, but I'm not sure if phy_init_hw
> should take care of this or if the polarity modes should be stored in
> memory allocated by the PHY driver and re-applied by the driver after
> reset (eg. in .config_init). Kinda depends on taste and on how common
> this behavior is in practise, so I thought the best is to reach out to
> discuss.

There was a similar discussion recently about WoL settings getting
lost. The conclusion about that was the PHY should keep track of WoL
setting. So i would say the same applies there. Please store it in a
local priv structure.

      Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ