From: Voon Weifeng <weifeng.voon@intel.com>
To: "David S. Miller" <davem@davemloft.net>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jose Abreu <joabreu@synopsys.com>, Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Ong Boon Leong <boon.leong.ong@intel.com>,
Voon Weifeng <weifeng.voon@intel.com>
Subject: [PATCH v1 net-next] net: phy: mdio_bus: make mdiobus_scan also cover PHY that only talks C45
Date: Tue, 27 Aug 2019 09:52:49 +0800 [thread overview]
Message-ID: <1566870769-9967-1-git-send-email-weifeng.voon@intel.com> (raw)
From: Ong Boon Leong <boon.leong.ong@intel.com>
Make mdiobus_scan() to try harder to look for any PHY that only talks C45.
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index bd04fe762056..30dbc48b4c7e 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -525,8 +525,12 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr)
int err;
phydev = get_phy_device(bus, addr, false);
- if (IS_ERR(phydev))
- return phydev;
+ if (IS_ERR(phydev)) {
+ /* Try C45 to ensure we don't miss PHY that only talks C45 */
+ phydev = get_phy_device(bus, addr, true);
+ if (IS_ERR(phydev))
+ return phydev;
+ }
/*
* For DT, see if the auto-probed phy has a correspoding child
--
1.9.1
next reply other threads:[~2019-08-26 17:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 1:52 Voon Weifeng [this message]
2019-08-26 18:27 ` Florian Fainelli
2019-08-26 18:54 ` Andrew Lunn
2019-08-27 15:23 ` Voon, Weifeng
2019-08-27 15:37 ` Florian Fainelli
2019-08-27 15:49 ` Andrew Lunn
2019-08-28 15:41 ` Ong, Boon Leong
2019-08-28 17:00 ` Florian Fainelli
2019-08-28 17:36 ` Voon, Weifeng
2019-08-26 21:28 ` David Miller
2019-08-27 10:25 ` Voon, Weifeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1566870769-9967-1-git-send-email-weifeng.voon@intel.com \
--to=weifeng.voon@intel.com \
--cc=andrew@lunn.ch \
--cc=boon.leong.ong@intel.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=joabreu@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome