On 04/01/16 09:36, Andrew Lunn wrote: > When the phy is connected, an info message is printed. If the netdev > it is attached to has not been registered yet, the name > 'uninitialised' in the output. By registering the netdev first, then > connecting they phy, we can avoid this. > > Signed-off-by: Andrew Lunn <and...@lunn.ch> > ---
[snip] > + ret = dsa_slave_phy_setup(p, slave_dev); > + if (ret) { > + netdev_err(master, "error %d setting up slave phy\n", ret); > + free_netdev(slave_dev); > + return ret; > + } > + > netif_carrier_off(slave_dev); Humm, I think this should be moved before dsa_slave_phy_setup() because some of the PHY library calls made in dsa_slave_phy_setup() are starting the PHY library state machine, so this call here might end up undoing some of what the library just did. This definitively belongs before the register_netdev() call though. -- Florian -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html