All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Marek Vasut <marex@denx.de>
Cc: netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
	Dan Murphy <dmurphy@ti.com>,
	"David S . Miller" <davem@davemloft.net>
Subject: Re: [PATCH] net: phy: Add RGMII_ID/TXID/RXID handling to the DP83822 driver
Date: Fri, 16 Jul 2021 22:16:32 +0200	[thread overview]
Message-ID: <YPHpILw+p2l6cKR9@lunn.ch> (raw)
In-Reply-To: <20210716182328.218768-1-marex@denx.de>

On Fri, Jul 16, 2021 at 08:23:28PM +0200, Marek Vasut wrote:
> Add support for setting the internal clock shift of the PHY based on
> the interface requirements. RX/TX/both is supported for RGMII.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Dan Murphy <dmurphy@ti.com>
> Cc: David S. Miller <davem@davemloft.net>
> ---
>  drivers/net/phy/dp83822.c | 37 +++++++++++++++++++++++++++++++++----
>  1 file changed, 33 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c
> index f7a2ec150e54..971c8d6b85d2 100644
> --- a/drivers/net/phy/dp83822.c
> +++ b/drivers/net/phy/dp83822.c
> @@ -72,6 +72,10 @@
>  #define DP83822_ANEG_ERR_INT_EN		BIT(6)
>  #define DP83822_EEE_ERROR_CHANGE_INT_EN	BIT(7)
>  
> +/* RCSR bits */
> +#define DP83822_RGMII_RX_CLOCK_SHIFT	BIT(12)
> +#define DP83822_RGMII_TX_CLOCK_SHIFT	BIT(11)
> +
>  /* INT_STAT1 bits */
>  #define DP83822_WOL_INT_EN	BIT(4)
>  #define DP83822_WOL_INT_STAT	BIT(12)
> @@ -326,11 +330,36 @@ static irqreturn_t dp83822_handle_interrupt(struct phy_device *phydev)
>  
>  static int dp8382x_disable_wol(struct phy_device *phydev)
>  {
> -	int value = DP83822_WOL_EN | DP83822_WOL_MAGIC_EN |
> -		    DP83822_WOL_SECURE_ON;
> +	u16 val = DP83822_WOL_EN | DP83822_WOL_MAGIC_EN | DP83822_WOL_SECURE_ON;
> +
> +	ret = phy_clear_bits_mmd(phydev, DP83822_DEVADDR,
> +				 MII_DP83822_WOL_CFG, val);
> +	if (ret < 0)
> +		return ret;
> +
  
> -	return phy_clear_bits_mmd(phydev, DP83822_DEVADDR,
> -				  MII_DP83822_WOL_CFG, value);
> +	return ret;
>  }

This change seems to have nothing to do with RGMII delays.  Please
split it out, so it does not distract from reviewing the real change
here.

It also seems odd you are changing RGMII delays when disabling WOL?
Rebase gone wrong?

	Andrew

  reply	other threads:[~2021-07-16 20:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 18:23 [PATCH] net: phy: Add RGMII_ID/TXID/RXID handling to the DP83822 driver Marek Vasut
2021-07-16 20:16 ` Andrew Lunn [this message]
2021-07-17 12:34   ` Marek Vasut
2021-07-18 19:31 ` kernel test robot
2021-07-18 19:31   ` kernel test robot

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=YPHpILw+p2l6cKR9@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dmurphy@ti.com \
    --cc=f.fainelli@gmail.com \
    --cc=marex@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.