All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: "David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew@lunn.ch>,
	netdev@vger.kernel.org
Subject: Re: [REGRESSION, BISECTED] Broken networking with net/phy/marvell
Date: Thu, 26 Oct 2017 16:12:32 +0300	[thread overview]
Message-ID: <20171026131232.3bj236va56mawse4@mwanda> (raw)
In-Reply-To: <20171026122836.zoggs44rkasflr3m@darkstar.musicnaut.iki.fi>

On Thu, Oct 26, 2017 at 03:28:36PM +0300, Aaro Koskinen wrote:
> Hi,
> 
> When upgrading from v4.13 to v4.14-rc6 on OpenRD Client, the box loses
> network connectivity.
> 
> Bisection points to:
> 
> commit 5987feb38aa55e035ce5376c02aba88a604cc881
> Author: Dan Carpenter <dan.carpenter@oracle.com>
> Date:   Fri Aug 4 11:17:21 2017 +0300
> 
>     net: phy: marvell: logical vs bitwise OR typo
>     
> However, it seems this commit just unhides another issue in the original
> commit 864dc729d528 ("net: phy: marvell: Refactor m88e1121 RGMII delay
> configuration"): when we are configuring the MSCR delay bits, we are
> probably clearing the bits with a wrong mask (i.e. we might be disabling
> something else not intended)...
> 
> I have tested the below change and it seems to fix the networking. Any
> comments?
> 
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> index 15cbcdb..500d7c1 100644
> --- a/drivers/net/phy/marvell.c
> +++ b/drivers/net/phy/marvell.c
> @@ -474,7 +474,7 @@ static int m88e1121_config_aneg_rgmii_delays(struct phy_device *phydev)
>  		goto out;
>  	}
>  
> -	mscr &= MII_88E1121_PHY_MSCR_DELAY_MASK;
> +	mscr &= ~MII_88E1121_PHY_MSCR_DELAY_MASK;
>  

I don't think your fix is right.  That mask was like that in the
original m88e1121_config_aneg() code before commit 864dc729d528 ("net:
phy: marvell: Refactor m88e1121 RGMII delay configuration").  Perhaps
the bug is that m88e1116r_config_init() used to not have the mask and
now it does?

Another difference I see is that we also didn't used to call
marvell_set_page(phydev, oldpage); on error, but I think that's a bugfix
and not related to what you're seeing.

I don't know the code well enough to write a fix.

regards,
dan carpenter

  reply	other threads:[~2017-10-26 13:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26 12:28 [REGRESSION, BISECTED] Broken networking with net/phy/marvell Aaro Koskinen
2017-10-26 13:12 ` Dan Carpenter [this message]
2017-10-26 14:06   ` Dan Carpenter
2017-10-28 19:01 ` Andrew Lunn
2017-10-30  0:19   ` Aaro Koskinen
2017-10-30 10:40     ` Andrew Lunn

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=20171026131232.3bj236va56mawse4@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --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.