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: <20190224175710.GL26626@lunn.ch>
Date:   Sun, 24 Feb 2019 18:57:10 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        David Miller <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net] net: phy: fix reading fixed phy status

On Sun, Feb 24, 2019 at 06:01:18PM +0100, Heiner Kallweit wrote:
> With the switch to phy_resolve_aneg_linkmode() we don't read from the
> chip any longer what is advertised but use phydev->advertising directly.
> For a fixed phy however this bitmap is empty so far, what results in
> no common mode being found. This breaks DSA. Fix this by advertising
> everything that is supported. For a normal phy this done by phy_probe().
> 
> Fixes: 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>

Tested-by: Andrew Lunn <andrew@...n.ch>

But i tested on net-next, not net.

    Andrew


> ---
>  drivers/net/phy/fixed_phy.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
> index b0d1368c3..1acd8bfdb 100644
> --- a/drivers/net/phy/fixed_phy.c
> +++ b/drivers/net/phy/fixed_phy.c
> @@ -22,6 +22,7 @@
>  #include <linux/seqlock.h>
>  #include <linux/idr.h>
>  #include <linux/netdevice.h>
> +#include <linux/linkmode.h>
>  
>  #include "swphy.h"
>  
> @@ -300,6 +301,8 @@ static struct phy_device *__fixed_phy_register(unsigned int irq,
>  				 phy->supported);
>  	}
>  
> +	linkmode_copy(phy->advertising, phy->supported);
> +
>  	ret = phy_device_register(phy);
>  	if (ret) {
>  		phy_device_free(phy);
> -- 
> 2.20.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ