lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ