Skip to contentSkip to conversation

of: mdio: preserve phy dev_flags in of_phy_connect()

PATCH Applied [email protected] 4 participants 4 messages Jun 18, 2020 – Jun 21, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: mdio: preserve phy dev_flags in of_phy_connect()

From: Tao Ren <[email protected]>

Replace assignment "=" with OR "|=" for "phy->dev_flags" so "dev_flags" configured in phy probe() function can be preserved.

The idea is similar to commit e7312efbd5de ("net: phy: modify assignment to OR for dev_flags in phy_attach_direct").

---
 drivers/of/of_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/of_mdio.c +1 -1
index a04afe79529c..f5c46c72f4d3 100644
@@ -380,7 +380,7 @@ struct phy_device *of_phy_connect(struct net_device *dev,
 	if (!phy)
 		return NULL;
 
-	phy->dev_flags = flags;
+	phy->dev_flags |= flags;
 
 	ret = phy_connect_direct(dev, phy, hndlr, iface);
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · On 6/18/2020 3:04 PM, [email protected] wrote:

From: Tao Ren <[email protected]>

Replace assignment "=" with OR "|=" for "phy->dev_flags" so "dev_flags" configured in phy probe() function can be preserved.

The idea is similar to commit e7312efbd5de ("net: phy: modify assignment to OR for dev_flags in phy_attach_direct").

Signature · 1 line
Florian
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 9 lines · On Thu, Jun 18, 2020 at 03:04:44PM -0700, [email protected] wrote:

From: Tao Ren <[email protected]>

Replace assignment "=" with OR "|=" for "phy->dev_flags" so "dev_flags" configured in phy probe() function can be preserved.

The idea is similar to commit e7312efbd5de ("net: phy: modify assignment to OR for dev_flags in phy_attach_direct").

Andrew