linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] of: mdio: preserve phy dev_flags in of_phy_connect()
@ 2020-06-18 22:04 rentao.bupt
  2020-06-18 22:12 ` Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rentao.bupt @ 2020-06-18 22:04 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit, Russell King,
	Rob Herring, Frank Rowand, netdev, devicetree, linux-kernel,
	openbmc, taoren
  Cc: Tao Ren

From: Tao Ren <rentao.bupt@gmail.com>

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").

Signed-off-by: Tao Ren <rentao.bupt@gmail.com>
---
 drivers/of/of_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index a04afe79529c..f5c46c72f4d3 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -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);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] of: mdio: preserve phy dev_flags in of_phy_connect()
  2020-06-18 22:04 [PATCH net-next] of: mdio: preserve phy dev_flags in of_phy_connect() rentao.bupt
@ 2020-06-18 22:12 ` Florian Fainelli
  2020-06-18 22:48 ` Andrew Lunn
  2020-06-21  0:33 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2020-06-18 22:12 UTC (permalink / raw)
  To: rentao.bupt, Andrew Lunn, Heiner Kallweit, Russell King,
	Rob Herring, Frank Rowand, netdev, devicetree, linux-kernel,
	openbmc, taoren



On 6/18/2020 3:04 PM, rentao.bupt@gmail.com wrote:
> From: Tao Ren <rentao.bupt@gmail.com>
> 
> 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").
> 
> Signed-off-by: Tao Ren <rentao.bupt@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] of: mdio: preserve phy dev_flags in of_phy_connect()
  2020-06-18 22:04 [PATCH net-next] of: mdio: preserve phy dev_flags in of_phy_connect() rentao.bupt
  2020-06-18 22:12 ` Florian Fainelli
@ 2020-06-18 22:48 ` Andrew Lunn
  2020-06-21  0:33 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2020-06-18 22:48 UTC (permalink / raw)
  To: rentao.bupt
  Cc: Florian Fainelli, Heiner Kallweit, Russell King, Rob Herring,
	Frank Rowand, netdev, devicetree, linux-kernel, openbmc, taoren

On Thu, Jun 18, 2020 at 03:04:44PM -0700, rentao.bupt@gmail.com wrote:
> From: Tao Ren <rentao.bupt@gmail.com>
> 
> 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").
> 
> Signed-off-by: Tao Ren <rentao.bupt@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] of: mdio: preserve phy dev_flags in of_phy_connect()
  2020-06-18 22:04 [PATCH net-next] of: mdio: preserve phy dev_flags in of_phy_connect() rentao.bupt
  2020-06-18 22:12 ` Florian Fainelli
  2020-06-18 22:48 ` Andrew Lunn
@ 2020-06-21  0:33 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-06-21  0:33 UTC (permalink / raw)
  To: rentao.bupt
  Cc: andrew, f.fainelli, hkallweit1, linux, robh+dt, frowand.list,
	netdev, devicetree, linux-kernel, openbmc, taoren

From: rentao.bupt@gmail.com
Date: Thu, 18 Jun 2020 15:04:44 -0700

> From: Tao Ren <rentao.bupt@gmail.com>
> 
> 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").
> 
> Signed-off-by: Tao Ren <rentao.bupt@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-21  0:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 22:04 [PATCH net-next] of: mdio: preserve phy dev_flags in of_phy_connect() rentao.bupt
2020-06-18 22:12 ` Florian Fainelli
2020-06-18 22:48 ` Andrew Lunn
2020-06-21  0:33 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).