[PATCH 06/10] net/farady: Helper functions to create or destroy MDIO interface

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jul 1 12:59:49 AEST 2016

On Thu, 2016-06-30 at 23:19 +0930, Joel Stanley wrote:
> +       priv->mii_bus->name = "ftgmac100_mdio";
> > +       snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE,
> "ftgmac100_mii");
> If we have two ftgmac100 drivers loaded (such as on the ast2500-evb),
> when the second goes to create the mdiobus kobject it will have the
> same name. We need to make this name unique (or fix up the mdiobus
> code).
> You can see a backtrace here:
>   https://github.com/openbmc/linux/issues/87

Traditional way:

	snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%d",
		 priv->pdev->name, priv->pdev->id);

IE, the name here isn't the same as mii_bus->name which is a user
visible name, but the actual *device* name (platform dev) and an id.


More information about the openbmc mailing list