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: <20210217044443.1246392-1-nathan@nathanrossi.com>
Date:   Wed, 17 Feb 2021 04:44:43 +0000
From:   Nathan Rossi <nathan@...hanrossi.com>
To:     netdev@...r.kernel.org
Cc:     Nathan Rossi <nathan@...hanrossi.com>,
        Nathan Rossi <nathan.rossi@...i.com>,
        Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH v2] of: of_mdio: Handle broken-turn-around for non-phy mdio devices

From: Nathan Rossi <nathan.rossi@...i.com>

The documentation for MDIO bindings describes the "broken-turn-around",
property such that any MDIO device can define it. Other MDIO devices may
require this property in order to correctly function on the MDIO bus.

Enable the parsing and configuration associated with this property for
non-phy MDIO devices.

Signed-off-by: Nathan Rossi <nathan.rossi@...i.com>
---
Changes in v2:
- Only handle broken-turn-around for non-phy devices
- No need for of_mdiobus_child_parse function
---
 drivers/net/mdio/of_mdio.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c
index 4daf94bb56..9796f259a8 100644
--- a/drivers/net/mdio/of_mdio.c
+++ b/drivers/net/mdio/of_mdio.c
@@ -158,6 +158,9 @@ static int of_mdiobus_register_device(struct mii_bus *mdio,
 	if (IS_ERR(mdiodev))
 		return PTR_ERR(mdiodev);
 
+	if (of_property_read_bool(child, "broken-turn-around"))
+		mdio->phy_ignore_ta_mask |= 1 << addr;
+
 	/* Associate the OF node with the device structure so it
 	 * can be looked up later.
 	 */
---
2.30.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ