[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111229191011.GA19220@oksana.dev.rtsoft.ru>
Date: Thu, 29 Dec 2011 23:10:11 +0400
From: Anton Vorontsov <anton.vorontsov@...aro.org>
To: Florian Fainelli <florian@...nwrt.org>
Cc: afleming@...escale.com, netdev@...r.kernel.org
Subject: Re: Allocation of MDIO bus numbers when fixed MDIO bus is enabled?
Hello,
On Thu, Dec 29, 2011 at 05:09:44PM +0100, Florian Fainelli wrote:
> An user of the r6040 driver has enabled support for the Fixed MDIO
> bus, so when the r6040 registers with its first instance, it will
> also try to register a MDIO bus with id 0, and this fails.
>
> What's the proper solution to fixing this kind of issue? The same
> user proposed to use the pci slot and function as an id for
> registering the MDIO bus, which will work for PCI devices, but not
> for platform_devices for instance.
AFAIR, MDIO bus id doesn't have to be numeric, so you can change it
to parent's dev_name(). I.e. something like
snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "%s-mdio", dev_name(dev));
So, the resulting PHYs would have IDs something like "dev-mdio:1".
Thanks,
--
Anton Vorontsov
Email: cbouatmailru@...il.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists