Skip to contentSkip to conversation

net: dwc_eth_qos: Pass -1 to phy_connect() to scan for all PHYs

PATCH New Marek Vasut 5 participants 5 messages Dec 18, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dwc_eth_qos: Pass -1 to phy_connect() to scan for all PHYs

PHY address 0 is a valid PHY address, to scan for all PHYs, pass -1 to phy_connect(). Passing 0 used to work before be accident, but does no longer.

Cc Joe Hershberger <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
Cc Ramon Fried <[email protected]>
---
 drivers/net/dwc_eth_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dwc_eth_qos.c +1 -1
index da5b696c9d..4632111635 100644
@@ -1045,7 +1045,7 @@ static int eqos_start(struct udevice *dev)
 	 * don't need to reconnect/reconfigure again
 	 */
 	if (!eqos->phy) {
-		eqos->phy = phy_connect(eqos->mii, 0, dev,
+		eqos->phy = phy_connect(eqos->mii, -1, dev,
 					eqos->config->interface(dev));
 		if (!eqos->phy) {
 			pr_err("phy_connect() failed");
Signature · 1 line
2.24.1
#1 lore raw

PATCH 1/1 net: dwc_eth_qos: Pass -1 to phy_connect() to scan for all PHYs

Hi,

Quoted 11 lines

From: Marek Vasut <[email protected]>
Sent: mercredi 18 décembre 2019 07:49

PHY address 0 is a valid PHY address, to scan for all PHYs, pass -1 to phy_connect(). Passing 0 used to work before be accident, but does no longer.

Cc Joe Hershberger <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
Cc Ramon Fried <[email protected]>
Quoted 18 lines
---
 drivers/net/dwc_eth_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dwc_eth_qos.c index renamed from drivers/net/dwc_eth_qos.c +0 -0

da5b696c9d..4632111635 100644

drivers/net/dwc_eth_qos.c +1 -2
@@ -1045,7 +1045,7 @@ static int eqos_start(struct udevice *dev)
 	 * don't need to reconnect/reconfigure again
 	 */
 	if (!eqos->phy) {
-		eqos->phy = phy_connect(eqos->mii, 0, dev,
+		eqos->phy = phy_connect(eqos->mii, -1, dev,
 					eqos->config->interface(dev));
 		if (!eqos->phy) {
 			pr_err("phy_connect() failed");
--
Quoted 1 line

2.24.1

Regards

#2 lore raw

PATCH 1/1 net: dwc_eth_qos: Pass -1 to phy_connect() to scan for all PHYs

Quoted 30 lines · Patrick DELAUNAY

Hi,

Quoted 11 lines

From: Marek Vasut <[email protected]>
Sent: mercredi 18 décembre 2019 07:49

PHY address 0 is a valid PHY address, to scan for all PHYs, pass -1 to phy_connect(). Passing 0 used to work before be accident, but does no longer.

Cc Joe Hershberger <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
Cc Ramon Fried <[email protected]>
Quoted 13 lines
---
 drivers/net/dwc_eth_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dwc_eth_qos.c index renamed from drivers/net/dwc_eth_qos.c +0 -0

da5b696c9d..4632111635 100644

drivers/net/dwc_eth_qos.c +0 -1
@@ -1045,7 +1045,7 @@ static int eqos_start(struct udevice *dev)
       * don't need to reconnect/reconfigure again
       */
      if (!eqos->phy) {
-             eqos->phy = phy_connect(eqos->mii, 0, dev,
Quoted 9 lines
Quoted 6 lines
drivers/net/dwc_eth_qos.c +1 -1
+             eqos->phy = phy_connect(eqos->mii, -1, dev,
                                      eqos->config->interface(dev));
              if (!eqos->phy) {
                      pr_err("phy_connect() failed");
--

2.24.1

Regards

#3 lore raw

PATCH 1/1 net: dwc_eth_qos: Pass -1 to phy_connect() to scan for all PHYs

In reply to Marek Vasut
Quoted 3 lines · Marek Vasut

PHY address 0 is a valid PHY address, to scan for all PHYs, pass -1 to phy_connect(). Passing 0 used to work before be accident, but does no

s/be/by

#4 lore raw

PATCH 1/1 net: dwc_eth_qos: Pass -1 to phy_connect() to scan for all PHYs

In reply to Marek Vasut
Quoted 10 lines · Marek Vasut

PHY address 0 is a valid PHY address, to scan for all PHYs, pass -1 to phy_connect(). Passing 0 used to work before be accident, but does no longer.

Cc Joe Hershberger <[email protected]>
Cc Patrice Chotard <[email protected]>
Cc Patrick Delaunay <[email protected]>
Cc Ramon Fried <[email protected]>