On 12/2/2020 7:54 PM, Grant Edwards wrote:
> On 2020-12-03, Florian Fainelli <f.faine...@gmail.com> wrote:
> 
>> You would have to have a local hack that intercepts the macb_ioctl()
>> and instead of calling phylink_mii_ioctl() it would have to
>> implement a custom ioctl() that does what
>> drivers/net/phy/phy.c::phy_mii_ioctl does except the mdiobus should
>> be pointed to the MACB MDIO bus instance and not be derived from the
>> phy_device instance (because that one points to the fixed PHY).
> 
> So I can avoid my local hack to macb_main.c by doing a doing a local
> hack to macb_main.c?

There is value in having the macb driver support the scheme that was
just described which is to support a fixed PHY as far as the MAC link
parameters go, and also support registering the MACB internal MDIO bus
to interface with other devices. People using DSA would typically fall
under that category.

The fact that you need to access the MACB internal MDIO bus to interface
with your PHYs would be a hack that is easier to carry forward, and
maybe more justifiable.

I don't have a dog in the fight, but dealing myself with cute little
hacks in our downstream Linux kernel, the better it fits with useful
functionality to other people, the better.
-- 
Florian

Reply via email to