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: <0fd67300-7f23-0181-f3b3-8ee61c15ea39@gmail.com>
Date:   Tue, 15 Oct 2019 11:27:18 -0700
From:   Doug Berger <opendmb@...il.com>
To:     Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org
Cc:     "David S. Miller" <davem@...emloft.net>,
        "open list:BROADCOM GENET ETHERNET DRIVER" 
        <bcm-kernel-feedback-list@...adcom.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] net: bcmgenet: Fix RGMII_MODE_EN value for GENET
 v1/2/3

On 10/15/19 10:45 AM, Florian Fainelli wrote:
> The RGMII_MODE_EN bit value was 0 for GENET versions 1 through 3, and
> became 6 for GENET v4 and above, account for that difference.
> 
> Fixes: aa09677cba42 ("net: bcmgenet: add MDIO routines")
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> ---
>  drivers/net/ethernet/broadcom/genet/bcmgenet.h | 1 +
>  drivers/net/ethernet/broadcom/genet/bcmmii.c   | 6 +++++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.h b/drivers/net/ethernet/broadcom/genet/bcmgenet.h
> index 4a8fc03d82fd..dbc69d8fa05f 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.h
> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.h
> @@ -366,6 +366,7 @@ struct bcmgenet_mib_counters {
>  #define  EXT_PWR_DOWN_PHY_EN		(1 << 20)
>  
>  #define EXT_RGMII_OOB_CTRL		0x0C
> +#define  RGMII_MODE_EN_V123		(1 << 0)
>  #define  RGMII_LINK			(1 << 4)
>  #define  OOB_DISABLE			(1 << 5)
>  #define  RGMII_MODE_EN			(1 << 6)
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
> index 94d1dd5d56bf..e7c291bf4ed1 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
> @@ -258,7 +258,11 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)
>  	 */
>  	if (priv->ext_phy) {
>  		reg = bcmgenet_ext_readl(priv, EXT_RGMII_OOB_CTRL);
> -		reg |= RGMII_MODE_EN | id_mode_dis;
> +		reg |= id_mode_dis;
> +		if (GENET_IS_V1(priv) || GENET_IS_V2(priv) || GENET_IS_V3(priv))
> +			reg |= RGMII_MODE_EN_V123;
> +		else
> +			reg |= RGMII_MODE_EN;
>  		bcmgenet_ext_writel(priv, reg, EXT_RGMII_OOB_CTRL);
>  	}
>  
> 

Acked-by: Doug Berger <opendmb@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ