All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Mian Yousaf Kaukab <ykaukab@suse.de>
Cc: netdev@vger.kernel.org, rric@kernel.org, tharvey@gateworks.com,
	linux-kernel@vger.kernel.org, sgoutham@cavium.com,
	davem@davemloft.net, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] net: thunderx: start phy before starting autonegotiation
Date: Wed, 4 Dec 2019 16:42:24 +0100	[thread overview]
Message-ID: <20191204154224.GE21904@lunn.ch> (raw)
In-Reply-To: <20191204152651.13418-1-ykaukab@suse.de>

On Wed, Dec 04, 2019 at 04:26:51PM +0100, Mian Yousaf Kaukab wrote:
> Since "2b3e88ea6528 net: phy: improve phy state checking"
> phy_start_aneg() expects phy state to be >= PHY_UP. Call phy_start()
> before calling phy_start_aneg() during probe so that autonegotiation
> is initiated.
> 
> Network fails without this patch on Octeon TX.
> 
> Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
> ---
>  drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
> index 1e09fdb63c4f..504644257aff 100644
> --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
> +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
> @@ -1115,6 +1115,7 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid)
>  				       phy_interface_mode(lmac->lmac_type)))
>  			return -ENODEV;
>  
> +		phy_start(lmac->phydev);
>  		phy_start_aneg(lmac->phydev);
>  		return 0;

phy_start() will start aneg, if aneg is configured. So you should be
able to remove the call to phy_start_aneg().

     Andrew

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch>
To: Mian Yousaf Kaukab <ykaukab@suse.de>
Cc: rric@kernel.org, netdev@vger.kernel.org, tharvey@gateworks.com,
	linux-kernel@vger.kernel.org, sgoutham@cavium.com,
	davem@davemloft.net, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] net: thunderx: start phy before starting autonegotiation
Date: Wed, 4 Dec 2019 16:42:24 +0100	[thread overview]
Message-ID: <20191204154224.GE21904@lunn.ch> (raw)
In-Reply-To: <20191204152651.13418-1-ykaukab@suse.de>

On Wed, Dec 04, 2019 at 04:26:51PM +0100, Mian Yousaf Kaukab wrote:
> Since "2b3e88ea6528 net: phy: improve phy state checking"
> phy_start_aneg() expects phy state to be >= PHY_UP. Call phy_start()
> before calling phy_start_aneg() during probe so that autonegotiation
> is initiated.
> 
> Network fails without this patch on Octeon TX.
> 
> Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
> ---
>  drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
> index 1e09fdb63c4f..504644257aff 100644
> --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
> +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
> @@ -1115,6 +1115,7 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid)
>  				       phy_interface_mode(lmac->lmac_type)))
>  			return -ENODEV;
>  
> +		phy_start(lmac->phydev);
>  		phy_start_aneg(lmac->phydev);
>  		return 0;

phy_start() will start aneg, if aneg is configured. So you should be
able to remove the call to phy_start_aneg().

     Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-12-04 15:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 15:26 [PATCH] net: thunderx: start phy before starting autonegotiation Mian Yousaf Kaukab
2019-12-04 15:26 ` Mian Yousaf Kaukab
2019-12-04 15:42 ` Andrew Lunn [this message]
2019-12-04 15:42   ` Andrew Lunn
2019-12-04 15:43 ` Sergei Shtylyov
2019-12-04 15:43   ` Sergei Shtylyov
2019-12-04 20:30 ` David Miller
2019-12-04 20:30   ` 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=20191204154224.GE21904@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rric@kernel.org \
    --cc=sgoutham@cavium.com \
    --cc=tharvey@gateworks.com \
    --cc=ykaukab@suse.de \
    /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.