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-next>] [day] [month] [year] [list]
Message-ID: <20141225125239.GP16916@distanz.ch>
Date:	Thu, 25 Dec 2014 13:52:39 +0100
From:	Tobias Klauser <tklauser@...tanz.ch>
To:	Kostya Belezko <bkostya@...mail.com>
Cc:	Nios2-dev <nios2-dev@...ts.rocketboards.org>,
	Vince Bridgers <vbridgers2013@...il.com>,
	netdev@...r.kernel.org
Subject: Re: [Nios2-dev] [PATCH] Altera TSE: Add missing phydev

On 2014-12-22 at 23:37:19 +0100, Kostya Belezko <bkostya@...mail.com> wrote:
> Altera network device doesn't come up after
> 
> ifconfig eth0 down
> ifconfig eth0 up
> 
> The reason behind is clearing priv->phydev during tse_shutdown().
> The phydev is not restored back at tse_open().
> 
> Signed-off-by: Kostya Belezko <bkostya@...mail.com>

Please Cc: netdev@...r.kernel.org for network driver patches.

> ---
>  drivers/net/ethernet/altera/altera_tse_main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
> index 4efc435..361bf35 100644
> --- a/drivers/net/ethernet/altera/altera_tse_main.c
> +++ b/drivers/net/ethernet/altera/altera_tse_main.c
> @@ -1150,6 +1150,9 @@ static int tse_open(struct net_device *dev)
>  
>  	spin_unlock_irqrestore(&priv->rxdma_irq_lock, flags);
>  
> +	if (!priv->phydev)
> +		init_phy(dev);

That way the PHY will be initialized twice on first start.

IMO the proper solution would be to disconnect and NULL the phydev in
altera_tse_remove, not in tse_shutdown. There, only phy_stop should be
called.
--
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