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]
Date: Thu, 4 Jan 2024 14:11:11 +0100
From: Christian Marangi <ansuelsmth@...il.com>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: 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>,
	Andrew Lunn <andrew@...n.ch>,
	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 v8 5/5] net: phy: at803x: add LED support for
 qca808x

On Thu, Jan 04, 2024 at 12:48:05PM +0100, Maxime Chevallier wrote:
> Hello Christian,
> 
> On Thu,  4 Jan 2024 12:01:12 +0100
> Christian Marangi <ansuelsmth@...il.com> wrote:
> 
> > Add LED support for QCA8081 PHY.
> > 
> > Documentation for this LEDs PHY is very scarce even with NDA access
> > to Documentation for OEMs. Only the blink pattern are documented and are
> > very confusing most of the time. No documentation is present about
> > forcing the LED on/off or to always blink.
> > 
> > Those settings were reversed by poking the regs and trying to find the
> > correct bits to trigger these modes. Some bits mode are not clear and
> > maybe the documentation option are not 100% correct. For the sake of LED
> > support the reversed option are enough to add support for current LED
> > APIs.
> 
> I have one small comment below :
> 
> > +static int qca808x_led_blink_set(struct phy_device *phydev, u8 index,
> > +				 unsigned long *delay_on,
> > +				 unsigned long *delay_off)
> > +{
> > +	int ret;
> > +	u16 reg;
> > +
> > +	if (index > 2)
> > +		return -EINVAL;
> > +
> > +	reg = QCA808X_MMD7_LED_FORCE_CTRL(index);
> > +
> > +	/* Set blink to 50% off, 50% on at 4Hz by default */
> > +	ret = phy_modify_mmd(phydev, MDIO_MMD_AN, QCA808X_MMD7_LED_GLOBAL,
> > +			     QCA808X_LED_BLINK_FREQ_MASK | QCA808X_LED_BLINK_DUTY_MASK,
> > +			     QCA808X_LED_BLINK_FREQ_256HZ | QCA808X_LED_BLINK_DUTY_50_50);
> 
> The comment (4Hz) and the blink frequency (256Hz) don't match, is that
> right ? because I see there exists a QCA808X_LED_BLINK_FREQ_4HZ
> definition, shouldn't it be used ?
>

Thanks for checking this, oversight by me! Will fix. (the blink
frequency was discovered only lately)

-- 
	Ansuel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ