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: <20240218190034.15447-3-ansuelsmth@gmail.com>
Date: Sun, 18 Feb 2024 20:00:28 +0100
From: Christian Marangi <ansuelsmth@...il.com>
To: Andrew Lunn <andrew@...n.ch>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
	Christian Marangi <ansuelsmth@...il.com>,
	Robert Marko <robimarko@...il.com>,
	"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@....com>,
	Nipun Gupta <nipun.gupta@....com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Puneet Gupta <puneet.gupta@....com>,
	Abhijit Gangurde <abhijit.gangurde@....com>,
	Umang Jain <umang.jain@...asonboard.com>,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [net-next RFC PATCH 2/6] net: phy: fill phy_id with C45 PHY

With C45 PHYs that provide PHY ID in C45 Package regs, PHY device
.phy_id is not filled.

Correctly fill .phy_id from matching dev_id or phy_driver info.

Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
---
 drivers/net/phy/phy_device.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 9b96357e4de8..60a60f182729 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -3476,6 +3476,10 @@ static int phy_probe(struct device *dev)
 		phy_dev_id->phy_id_mask = phydrv->phy_id_mask;
 	}
 
+	/* Fill PHY ID with dev_id if empty and PHY is C45 */
+	if (!phydev->phy_id && phydev->is_c45)
+		phydev->phy_id = phy_dev_id->phy_id;
+
 	/* Disable the interrupt if the PHY doesn't support it
 	 * but the interrupt is still a valid one
 	 */
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ