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:   Fri,  1 Mar 2019 11:54:23 +0100
From:   Jose Abreu <jose.abreu@...opsys.com>
To:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Jose Abreu <jose.abreu@...opsys.com>, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Joao Pinto <joao.pinto@...opsys.com>
Subject: [PATCH net 1/2] net: phy: Use C45 Helpers in phy_read_status()

Currently phy_read_status() considers that either the PHY driver has the
read_status() callback or uses the generic callback.

For C45 PHYs we need to use the gen10g_read_status() callback.

Signed-off-by: Jose Abreu <joabreu@...opsys.com>
Cc: Andrew Lunn <andrew@...n.ch>
Cc: Florian Fainelli <f.fainelli@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Joao Pinto <joao.pinto@...opsys.com>
---
 include/linux/phy.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/phy.h b/include/linux/phy.h
index 333b56d8f746..872899136fdc 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1030,6 +1030,8 @@ static inline int phy_read_status(struct phy_device *phydev)
 
 	if (phydev->drv->read_status)
 		return phydev->drv->read_status(phydev);
+	else if (phydev->is_c45)
+		return gen10g_read_status(phydev);
 	else
 		return genphy_read_status(phydev);
 }
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ