lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ