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]
Message-ID: <20160309143927.GD31963@lunn.ch>
Date:	Wed, 9 Mar 2016 15:39:27 +0100
From:	Andrew Lunn <andrew@...n.ch>
To:	Giuseppe Cavallaro <peppe.cavallaro@...com>
Cc:	netdev@...r.kernel.org, gabriel.fernandez@...aro.org,
	afaerber@...e.de, fschaefer.oss@...glemail.com,
	dinh.linux@...il.com, davem@...emloft.net
Subject: Re: [PATCH (net.git) 2/2] stmmac: fix MDIO settings

On Wed, Mar 09, 2016 at 10:00:07AM +0100, Giuseppe Cavallaro wrote:
> Initially the phy_bus_name was added to manipulate the
> driver name but It was recently just used to manage the
> fixed-link and then to take some decision at run-time
> inside the main (for example to skip EEE).
> 
> So the patch now introduces a new platforms boolean to
> manage that and removes the phy_bus_name variable not
> necessary anymore.
> 
> The driver can manage the mdio registration by using phy-handle,
> dwmac-mdio and own parameter e.g. snps,phy-addr.
> This patch takes care about all these possible configurations
> and fixes the mdio registration in case of there is a real
> transceiver or a switch (that needs to be managed by using
> fixed-link).
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@...com>
> Cc: Gabriel Fernandez <gabriel.fernandez@...aro.org>
> Cc: Andreas Färber <afaerber@...e.de>
> Cc: Frank Schäfer <fschaefer.oss@...glemail.com>
> Cc: Dinh Nguyen <dinh.linux@...il.com>
> Cc: David S. Miller <davem@...emloft.net>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |   11 +++--------
>  .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |   15 ++++++---------
>  include/linux/stmmac.h                             |    2 +-
>  3 files changed, 10 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index c21015b..87e4643 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -271,7 +271,6 @@ static void stmmac_eee_ctrl_timer(unsigned long arg)
>   */
>  bool stmmac_eee_init(struct stmmac_priv *priv)
>  {
> -	char *phy_bus_name = priv->plat->phy_bus_name;
>  	unsigned long flags;
>  	bool ret = false;
>  
> @@ -283,7 +282,7 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
>  		goto out;
>  
>  	/* Never init EEE in case of a switch is attached */
> -	if (phy_bus_name && (!strcmp(phy_bus_name, "fixed")))
> +	if (priv->plat->is_fixed_link)
>  		goto out;

Hi Giuseppe

The phydev itself has a bool is_pseudo_fixed_link. You might be able
to use this instead of adding your own.

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ