From: Anton Vorontsov <anton.vorontsov@linaro.org>
To: Florian Fainelli <florian@openwrt.org>
Cc: afleming@freescale.com, netdev@vger.kernel.org
Subject: Re: Allocation of MDIO bus numbers when fixed MDIO bus is enabled?
Date: Thu, 29 Dec 2011 23:10:11 +0400 [thread overview]
Message-ID: <20111229191011.GA19220@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <4EFC90C8.1060802@openwrt.org>
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@gmail.com
next prev parent reply other threads:[~2011-12-29 19:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 16:09 Allocation of MDIO bus numbers when fixed MDIO bus is enabled? Florian Fainelli
2011-12-29 19:10 ` Anton Vorontsov [this message]
2011-12-30 3:52 ` Andy Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111229191011.GA19220@oksana.dev.rtsoft.ru \
--to=anton.vorontsov@linaro.org \
--cc=afleming@freescale.com \
--cc=florian@openwrt.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).