All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] ftgmac100: Make the MDIO bus a child of the ethernet device
@ 2017-07-24  6:59 Benjamin Herrenschmidt
  2017-07-24 13:13 ` Joel Stanley
  2017-07-25  0:24 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2017-07-24  6:59 UTC (permalink / raw)
  To: netdev; +Cc: Joel Stanley

Populate mii_bus->parent with our own platform device before
registering, which makes it easier to locate the MDIO bus
in sysfs when trying to diagnose problems.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 drivers/net/ethernet/faraday/ftgmac100.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 2b17f7023d91..fce0aa4f78b7 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -1682,6 +1682,7 @@ static int ftgmac100_setup_mdio(struct net_device *netdev)
 	priv->mii_bus->name = "ftgmac100_mdio";
 	snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%d",
 		 pdev->name, pdev->id);
+	priv->mii_bus->parent = priv->dev;
 	priv->mii_bus->priv = priv->netdev;
 	priv->mii_bus->read = ftgmac100_mdiobus_read;
 	priv->mii_bus->write = ftgmac100_mdiobus_write;

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

* Re: [PATCH 2/2] ftgmac100: Make the MDIO bus a child of the ethernet device
  2017-07-24  6:59 [PATCH 2/2] ftgmac100: Make the MDIO bus a child of the ethernet device Benjamin Herrenschmidt
@ 2017-07-24 13:13 ` Joel Stanley
  2017-07-25  0:24 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Stanley @ 2017-07-24 13:13 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: netdev, Joel Stanley

On Mon, Jul 24, 2017 at 4:29 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> Populate mii_bus->parent with our own platform device before
> registering, which makes it easier to locate the MDIO bus
> in sysfs when trying to diagnose problems.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Acked-by: Joel Stanley <joel@jms.id.au>

> ---
>  drivers/net/ethernet/faraday/ftgmac100.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index 2b17f7023d91..fce0aa4f78b7 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -1682,6 +1682,7 @@ static int ftgmac100_setup_mdio(struct net_device *netdev)
>         priv->mii_bus->name = "ftgmac100_mdio";
>         snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%d",
>                  pdev->name, pdev->id);
> +       priv->mii_bus->parent = priv->dev;
>         priv->mii_bus->priv = priv->netdev;
>         priv->mii_bus->read = ftgmac100_mdiobus_read;
>         priv->mii_bus->write = ftgmac100_mdiobus_write;
>

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

* Re: [PATCH 2/2] ftgmac100: Make the MDIO bus a child of the ethernet device
  2017-07-24  6:59 [PATCH 2/2] ftgmac100: Make the MDIO bus a child of the ethernet device Benjamin Herrenschmidt
  2017-07-24 13:13 ` Joel Stanley
@ 2017-07-25  0:24 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-07-25  0:24 UTC (permalink / raw)
  To: benh; +Cc: netdev, joel.stanley

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Mon, 24 Jul 2017 16:59:07 +1000

> Populate mii_bus->parent with our own platform device before
> registering, which makes it easier to locate the MDIO bus
> in sysfs when trying to diagnose problems.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Applied.

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

end of thread, other threads:[~2017-07-25  0:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-24  6:59 [PATCH 2/2] ftgmac100: Make the MDIO bus a child of the ethernet device Benjamin Herrenschmidt
2017-07-24 13:13 ` Joel Stanley
2017-07-25  0:24 ` David Miller

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.