[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <568B2383.2010608@gmail.com>
Date: Mon, 04 Jan 2016 17:59:31 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Andrew Lunn <andrew@...n.ch>
CC: netdev <netdev@...r.kernel.org>
Subject: Re: [RFC PATCH net-next 15/24] dsa: Register netdev before phy
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 <andrew@...n.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists