All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net:phy:dp83867: set up rgmii tx delay
@ 2019-05-24 10:35 Max Uvarov
  2019-05-24 14:37 ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Max Uvarov @ 2019-05-24 10:35 UTC (permalink / raw)
  To: netdev; +Cc: andrew, f.fainelli, hkallweit1, davem, Max Uvarov

PHY_INTERFACE_MODE_RGMII_RXID is less then TXID
so code to set tx delay is never called.

Signed-off-by: Max Uvarov <muvarov@gmail.com>
---
 drivers/net/phy/dp83867.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 2984fd5ae495..5fed837665ea 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -251,10 +251,8 @@ static int dp83867_config_init(struct phy_device *phydev)
 		ret = phy_write(phydev, MII_DP83867_PHYCTRL, val);
 		if (ret)
 			return ret;
-	}
 
-	if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) &&
-	    (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) {
+		/* Set up RGMII delays */
 		val = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_RGMIICTL);
 
 		if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net:phy:dp83867: set up rgmii tx delay
  2019-05-24 10:35 [PATCH] net:phy:dp83867: set up rgmii tx delay Max Uvarov
@ 2019-05-24 14:37 ` Florian Fainelli
  2019-05-24 19:46   ` Maxim Uvarov
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2019-05-24 14:37 UTC (permalink / raw)
  To: Max Uvarov, netdev; +Cc: andrew, hkallweit1, davem



On 5/24/2019 3:35 AM, Max Uvarov wrote:
> PHY_INTERFACE_MODE_RGMII_RXID is less then TXID
> so code to set tx delay is never called.
> 
> Signed-off-by: Max Uvarov <muvarov@gmail.com>

Could you provide an appropriate Fixes: tag for this as well as fix the
subject to be:

net: phy: dp83867: Set up RGMII TX delay

(sorry for being uber nitpicking on this)

> ---
>  drivers/net/phy/dp83867.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
> index 2984fd5ae495..5fed837665ea 100644
> --- a/drivers/net/phy/dp83867.c
> +++ b/drivers/net/phy/dp83867.c
> @@ -251,10 +251,8 @@ static int dp83867_config_init(struct phy_device *phydev)
>  		ret = phy_write(phydev, MII_DP83867_PHYCTRL, val);
>  		if (ret)
>  			return ret;
> -	}
>  

Is this hunk ^ intentional?

> -	if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) &&
> -	    (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) {
> +		/* Set up RGMII delays */
>  		val = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_RGMIICTL);
>  
>  		if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
> 

-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net:phy:dp83867: set up rgmii tx delay
  2019-05-24 14:37 ` Florian Fainelli
@ 2019-05-24 19:46   ` Maxim Uvarov
  0 siblings, 0 replies; 3+ messages in thread
From: Maxim Uvarov @ 2019-05-24 19:46 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: netdev, Andrew Lunn, Heiner Kallweit, David Miller

пт, 24 мая 2019 г. в 17:37, Florian Fainelli <f.fainelli@gmail.com>:
>
>
>
> On 5/24/2019 3:35 AM, Max Uvarov wrote:
> > PHY_INTERFACE_MODE_RGMII_RXID is less then TXID
> > so code to set tx delay is never called.
> >
> > Signed-off-by: Max Uvarov <muvarov@gmail.com>
>
> Could you provide an appropriate Fixes: tag for this as well as fix the
> subject to be:
>
> net: phy: dp83867: Set up RGMII TX delay
>
> (sorry for being uber nitpicking on this)
>
> > ---
> >  drivers/net/phy/dp83867.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
> > index 2984fd5ae495..5fed837665ea 100644
> > --- a/drivers/net/phy/dp83867.c
> > +++ b/drivers/net/phy/dp83867.c
> > @@ -251,10 +251,8 @@ static int dp83867_config_init(struct phy_device *phydev)
> >               ret = phy_write(phydev, MII_DP83867_PHYCTRL, val);
> >               if (ret)
> >                       return ret;
> > -     }
> >
>
> Is this hunk ^ intentional?
>

yes. Might be hard to see idea in patch without looking to the code.
But it just removes if bellow and puts the code to upper if stametent.
Which is if rgmii().
That is needed for connection type rgmi-txid which has actual setting bellow.

Max.

> > -     if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) &&
> > -         (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) {
> > +             /* Set up RGMII delays */
> >               val = phy_read_mmd(phydev, DP83867_DEVADDR, DP83867_RGMIICTL);
> >
> >               if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
> >
>
> --
> Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-24 19:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 10:35 [PATCH] net:phy:dp83867: set up rgmii tx delay Max Uvarov
2019-05-24 14:37 ` Florian Fainelli
2019-05-24 19:46   ` Maxim Uvarov

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.