linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] net: stmmac: allow stmmac to probe for C45 PHY devices
@ 2020-12-09 11:19 Wong Vee Khee
  2020-12-09 16:09 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Wong Vee Khee @ 2020-12-09 11:19 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Ong Boon Leong, Voon Wei Feng, Wong Vee Khee

Assign stmmac's mdio_bus probe capabilities to MDIOBUS_C22_C45.
This extends the probing of C45 PHY devices on the MDIO bus.

Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index b2a707e2ef43..9f96bb7d27db 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -364,6 +364,7 @@ int stmmac_mdio_register(struct net_device *ndev)
 		memcpy(new_bus->irq, mdio_bus_data->irqs, sizeof(new_bus->irq));
 
 	new_bus->name = "stmmac";
+	new_bus->probe_capabilities = MDIOBUS_C22_C45;
 
 	if (priv->plat->has_xgmac) {
 		new_bus->read = &stmmac_xgmac2_mdio_read;
-- 
2.17.0


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

* Re: [PATCH net-next 1/1] net: stmmac: allow stmmac to probe for C45 PHY devices
  2020-12-09 11:19 [PATCH net-next 1/1] net: stmmac: allow stmmac to probe for C45 PHY devices Wong Vee Khee
@ 2020-12-09 16:09 ` Andrew Lunn
  2020-12-09 22:36   ` Wong, Vee Khee
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2020-12-09 16:09 UTC (permalink / raw)
  To: Wong Vee Khee
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin, Voon Wei Feng,
	netdev, linux-kernel, Ong Boon Leong, linux-stm32,
	linux-arm-kernel

On Wed, Dec 09, 2020 at 07:19:33PM +0800, Wong Vee Khee wrote:
> Assign stmmac's mdio_bus probe capabilities to MDIOBUS_C22_C45.
> This extends the probing of C45 PHY devices on the MDIO bus.
> 
> Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> index b2a707e2ef43..9f96bb7d27db 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> @@ -364,6 +364,7 @@ int stmmac_mdio_register(struct net_device *ndev)
>  		memcpy(new_bus->irq, mdio_bus_data->irqs, sizeof(new_bus->irq));
>  
>  	new_bus->name = "stmmac";
> +	new_bus->probe_capabilities = MDIOBUS_C22_C45;

It looks like this needs to be conditional on the version. xgmax2
supports C45. And gmac4. But other versions don't.

	 Andrew

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

* RE: [PATCH net-next 1/1] net: stmmac: allow stmmac to probe for C45 PHY devices
  2020-12-09 16:09 ` Andrew Lunn
@ 2020-12-09 22:36   ` Wong, Vee Khee
  0 siblings, 0 replies; 3+ messages in thread
From: Wong, Vee Khee @ 2020-12-09 22:36 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin, Voon, Weifeng,
	netdev, linux-kernel, Ong, Boon Leong, linux-stm32,
	linux-arm-kernel



> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: Thursday, December 10, 2020 12:09 AM
> To: Wong, Vee Khee <vee.khee.wong@intel.com>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>; Alexandre Torgue
> <alexandre.torgue@st.com>; Jose Abreu <joabreu@synopsys.com>; David
> S . Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>;
> Maxime Coquelin <mcoquelin.stm32@gmail.com>; Voon, Weifeng
> <weifeng.voon@intel.com>; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; Ong, Boon Leong <boon.leong.ong@intel.com>;
> linux-stm32@st-md-mailman.stormreply.com; linux-arm-
> kernel@lists.infradead.org
> Subject: Re: [PATCH net-next 1/1] net: stmmac: allow stmmac to probe for
> C45 PHY devices
> 
> On Wed, Dec 09, 2020 at 07:19:33PM +0800, Wong Vee Khee wrote:
> > Assign stmmac's mdio_bus probe capabilities to MDIOBUS_C22_C45.
> > This extends the probing of C45 PHY devices on the MDIO bus.
> >
> > Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
> > ---
> >  drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> > index b2a707e2ef43..9f96bb7d27db 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
> > @@ -364,6 +364,7 @@ int stmmac_mdio_register(struct net_device *ndev)
> >  		memcpy(new_bus->irq, mdio_bus_data->irqs,
> sizeof(new_bus->irq));
> >
> >  	new_bus->name = "stmmac";
> > +	new_bus->probe_capabilities = MDIOBUS_C22_C45;
> 
> It looks like this needs to be conditional on the version. xgmax2
> supports C45. And gmac4. But other versions don't.
> 
> 	 Andrew

I will send a v2 with conditional checking for gmac4.
I do not have a xgmac2 hardware setup to test this.

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

end of thread, other threads:[~2020-12-09 22:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 11:19 [PATCH net-next 1/1] net: stmmac: allow stmmac to probe for C45 PHY devices Wong Vee Khee
2020-12-09 16:09 ` Andrew Lunn
2020-12-09 22:36   ` Wong, Vee Khee

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