Re: [PATCH net-next v2 2/5] net: dsa: Initialize ds->enabled_port_mask and ds->phys_mii_mask

2016-06-07 Thread Andrew Lunn
On Tue, Jun 07, 2016 at 02:22:12AM +0200, Andrew Lunn wrote: > > @@ -304,6 +312,18 @@ static int dsa_ds_apply(struct dsa_switch_tree *dst, > > struct dsa_switch *ds) > > if (err < 0) > > return err; > > > > + if (!ds->slave_mii_bus && ds->drv->phy_read) { > > +

Re: [PATCH net-next v2 2/5] net: dsa: Initialize ds->enabled_port_mask and ds->phys_mii_mask

2016-06-06 Thread Andrew Lunn
> @@ -304,6 +312,18 @@ static int dsa_ds_apply(struct dsa_switch_tree *dst, > struct dsa_switch *ds) > if (err < 0) > return err; > > + if (!ds->slave_mii_bus && ds->drv->phy_read) { > + ds->slave_mii_bus = devm_mdiobus_alloc(ds->dev); > + if

[PATCH net-next v2 2/5] net: dsa: Initialize ds->enabled_port_mask and ds->phys_mii_mask

2016-06-06 Thread Florian Fainelli
Some drivers rely on these two bitmasks to contain the correct values for them to successfully probe and initialize at drv->setup() time, calculate correct values to put in both masks as early as possible in dsa_get_ports_dn(). Signed-off-by: Florian Fainelli ---