netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Kevin Lo <kevlo@kevlo.org>, netdev@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>, "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next] net: phy: broadcom: fix BCM54XX_SHD_SCR3_TRDDAPD value for BCM54810
Date: Wed, 13 May 2020 18:31:29 -0700	[thread overview]
Message-ID: <63c86b00-171b-cdda-317f-1b14622a50d1@gmail.com> (raw)
In-Reply-To: <20200514005733.GA94953@ns.kevlo.org>



On 5/13/2020 5:57 PM, Kevin Lo wrote:
> Set the correct bit when checking for PHY_BRCM_DIS_TXCRXC_NOENRGY on the 
> BCM54810 PHY.

Indeed, good catch!
> 
> Signed-off-by: Kevin Lo <kevlo@kevlo.org>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Is the following commit when it started to break?

Fixes: 0ececcfc9267 ("net: phy: broadcom: Allow BCM54810 to use
bcm54xx_adjust_rxrefclk()")

> ---
> diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
> index 97201d5cf007..45d0aefb964c 100644
> --- a/drivers/net/phy/broadcom.c
> +++ b/drivers/net/phy/broadcom.c
> @@ -225,8 +225,12 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev)
>  	else
>  		val |= BCM54XX_SHD_SCR3_DLLAPD_DIS;
>  
> -	if (phydev->dev_flags & PHY_BRCM_DIS_TXCRXC_NOENRGY)
> -		val |= BCM54XX_SHD_SCR3_TRDDAPD;
> +	if (phydev->dev_flags & PHY_BRCM_DIS_TXCRXC_NOENRGY) {
> +		if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54810)
> +			val |= BCM54810_SHD_SCR3_TRDDAPD;
> +		else
> +			val |= BCM54XX_SHD_SCR3_TRDDAPD;
> +	}
>  
>  	if (orig != val)
>  		bcm_phy_write_shadow(phydev, BCM54XX_SHD_SCR3, val);
> diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h
> index d41624db6de2..1d339a862f7b 100644
> --- a/include/linux/brcmphy.h
> +++ b/include/linux/brcmphy.h
> @@ -255,6 +255,7 @@
>  #define BCM54810_EXP_BROADREACH_LRE_MISC_CTL_EN	(1 << 0)
>  #define BCM54810_SHD_CLK_CTL			0x3
>  #define BCM54810_SHD_CLK_CTL_GTXCLK_EN		(1 << 9)
> +#define BCM54810_SHD_SCR3_TRDDAPD		0x0100
>  
>  /* BCM54612E Registers */
>  #define BCM54612E_EXP_SPARE0		(MII_BCM54XX_EXP_SEL_ETC + 0x34)
> 

-- 
Florian

  reply	other threads:[~2020-05-14  1:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  0:57 [PATCH net-next] net: phy: broadcom: fix BCM54XX_SHD_SCR3_TRDDAPD value for BCM54810 Kevin Lo
2020-05-14  1:31 ` Florian Fainelli [this message]
2020-05-14  1:54   ` Kevin Lo
2020-05-15  0:40 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63c86b00-171b-cdda-317f-1b14622a50d1@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kevlo@kevlo.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).