diff mbox series

[v2,net-next,1/1] net: stmmac: allow stmmac to probe for C45 PHY devices

Message ID 20201209224700.30295-1-vee.khee.wong@intel.com (mailing list archive)
State Accepted
Delegated to: Netdev Maintainers
Headers show
Series [v2,net-next,1/1] net: stmmac: allow stmmac to probe for C45 PHY devices | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Wong, Vee Khee Dec. 9, 2020, 10:47 p.m. UTC
Assign stmmac's mdio_bus probe capabilities to MDIOBUS_C22_C45.
This extended the probing of C45 PHY devices on the MDIO bus.

Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
---
v2 changelog:
- Added conditional check for gmac4.
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Andrew Lunn Dec. 10, 2020, 12:43 a.m. UTC | #1
On Thu, Dec 10, 2020 at 06:47:00AM +0800, Wong Vee Khee wrote:
> Assign stmmac's mdio_bus probe capabilities to MDIOBUS_C22_C45.
> This extended the probing of C45 PHY devices on the MDIO bus.
> 
> Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>

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

    Andrew
David Miller Dec. 10, 2020, 3:40 a.m. UTC | #2
From: Wong Vee Khee <vee.khee.wong@intel.com>
Date: Thu, 10 Dec 2020 06:47:00 +0800

> Assign stmmac's mdio_bus probe capabilities to MDIOBUS_C22_C45.
> This extended the probing of C45 PHY devices on the MDIO bus.
> 
> Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
> ---
> v2 changelog:
> - Added conditional check for gmac4.

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index b2a707e2ef43..d64116e0543e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -365,6 +365,9 @@  int stmmac_mdio_register(struct net_device *ndev)
 
 	new_bus->name = "stmmac";
 
+	if (priv->plat->has_gmac4)
+		new_bus->probe_capabilities = MDIOBUS_C22_C45;
+
 	if (priv->plat->has_xgmac) {
 		new_bus->read = &stmmac_xgmac2_mdio_read;
 		new_bus->write = &stmmac_xgmac2_mdio_write;