All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net/phy: Fix phy_connect() for phy addr 0
@ 2019-11-05  4:05 Priyanka Jain
  2019-11-07 19:15 ` Tom Rini
  0 siblings, 1 reply; 18+ messages in thread
From: Priyanka Jain @ 2019-11-05  4:05 UTC (permalink / raw)
  To: u-boot

Fix 'mask' calculation in phy_connect() for phy addr '0'.
'mask' is getting set to '0xffffffff' for phy addr '0'
in phy_connect() whereas expected value is '0'.


Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
---
 drivers/net/phy/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index ae37dd6c1e..419e6869c0 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -952,7 +952,7 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr,
 #endif
 {
 	struct phy_device *phydev = NULL;
-	uint mask = (addr > 0) ? (1 << addr) : 0xffffffff;
+	uint mask = (addr >= 0) ? (1 << addr) : 0xffffffff;
 
 #ifdef CONFIG_PHY_FIXED
 	phydev = phy_connect_fixed(bus, dev, interface);
-- 
2.17.1

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

end of thread, other threads:[~2019-12-19 12:16 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05  4:05 [U-Boot] [PATCH] net/phy: Fix phy_connect() for phy addr 0 Priyanka Jain
2019-11-07 19:15 ` Tom Rini
2019-11-07 20:04   ` Joe Hershberger
2019-12-17  7:38     ` Marek Vasut
2019-12-17 12:52       ` Tom Rini
2019-12-17 13:16         ` Marek Vasut
2019-12-17 16:25       ` Joe Hershberger
2019-12-17 17:35         ` Marek Vasut
2019-12-17 18:47           ` Joe Hershberger
2019-12-17 19:04             ` Marek Vasut
2019-12-17 23:35               ` Tom Rini
2019-12-18  4:24                 ` Marek Vasut
2019-12-18  2:11               ` Joe Hershberger
2019-12-18  4:48                 ` Marek Vasut
2019-12-18 16:15                   ` Joe Hershberger
2019-12-18 16:16                     ` Marek Vasut
2019-12-19  6:30                       ` Priyanka Jain
2019-12-19 12:16                         ` Alexandru Marginean

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.