> > + /* bus capabilities, used for probing */ > > + enum { > > + MDIOBUS_C22 = 0, > > + MDIOBUS_C45, > > + MDIOBUS_C22_C45, > > + } probe_capabilities; > > I think it would be better to reserve "0" to mean that no capabilities > have been declared. We hae the situation where we have mii_bus that > exist which do support C45, but as they stand, probe_capabilities will > be zero, and with your definitions above, that means MDIOBUS_C22. > > It seems this could lock in some potential issues later down the line > if we want to use this elsewhere.
Hi Russell Actually, this patch already causes issues, i think. drivers/net/ethernet/marvell/mvmdio.c contains two MDIO bus master drivers. "marvell,orion-mdio" is C22 only. "marvell,xmdio" is C45 only. Because the capabilites is not initialized, it will default to 0, aka MDIOBUS_C22, for the C45 only bus master, and i expect bad things will happen. We need the value of 0 to cause existing behaviour. Or all MDIO bus drivers need reviewing, and the correct capabilities set. Andrew