DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Ferruh Yigit'" <ferruh.yigit@intel.com>, <dev@dpdk.org>
Cc: "'Luca Boccassi'" <bluca@debian.org>,
	"'Kevin Traynor'" <ktraynor@redhat.com>
Subject: RE: [PATCH 5/9] net/ngbe: optimize the PHY initialization process
Date: Wed, 9 Feb 2022 10:38:30 +0800	[thread overview]
Message-ID: <014c01d81d5e$20b00ed0$62102c70$@trustnetic.com> (raw)
In-Reply-To: <7f30844a-db92-cb12-8264-486876c9ed27@intel.com>

On February 9, 2022 1:40 AM, Ferruh Yigit wrote:
> On 2/8/2022 10:11 AM, Jiawen Wu wrote:
> > Reduce the probability of PHY init failure, And add its error return.
> >
> 
> Patch is missing stable tag, is it intentional?
> Or do you want patch not to be backported?
> 

Because PHY init failed never occurred in our local tests with the original code.
But the problem of failure to link up recently appeared in the customer, which is extremely unlikely, and we think it is related to PHY initialization.
At the driver level, this fix addresses some potential risks. However, due to different hardware (customers use our chips to make their own network cards), this fix cannot be fully proven to be effective.
So this is just an optimization that we think needs to be done.

> > Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> 
> <...>
> 
> > @@ -234,17 +242,7 @@ s32 ngbe_reset_phy_rtl(struct ngbe_hw *hw)
> >   	value |= RTL_BMCR_RESET;
> >   	status = hw->phy.write_reg(hw, RTL_BMCR, RTL_DEV_ZERO, value);
> >
> > -	for (i = 0; i < RTL_PHY_RST_WAIT_PERIOD; i++) {
> > -		status = hw->phy.read_reg(hw, RTL_BMCR, RTL_DEV_ZERO,
> &value);
> > -		if (!(value & RTL_BMCR_RESET))
> > -			break;
> > -		msleep(1);
> > -	}
> > -
> > -	if (i == RTL_PHY_RST_WAIT_PERIOD) {
> > -		DEBUGOUT("PHY reset polling failed to complete.\n");
> > -		return NGBE_ERR_RESET_FAILED;
> > -	}	
> > +	msec_delay(5);
> >
> 
> There are hardcoded delays added in this patch and other ones in this set, I just
> want to remind that this can lead unexpected (and very hard to debug) errors.

Yes, this polling never succeeded. So we think hardcoded delay is just required.




  reply	other threads:[~2022-02-09  2:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 10:11 [PATCH 0/9] Wangxun fixes and supports Jiawen Wu
2022-02-08 10:11 ` [PATCH 1/9] net/ngbe: fix failed to receive packets Jiawen Wu
2022-02-08 10:11 ` [PATCH 2/9] net/ngbe: fix link interrupt sometimes lost Jiawen Wu
2022-02-08 10:11 ` [PATCH 3/9] net/ngbe: fix Tx pending Jiawen Wu
2022-02-08 17:38   ` Ferruh Yigit
2022-02-08 10:11 ` [PATCH 4/9] net/ngbe: fix RxTx packet statistics Jiawen Wu
2022-02-08 17:38   ` Ferruh Yigit
2022-02-08 10:11 ` [PATCH 5/9] net/ngbe: optimize the PHY initialization process Jiawen Wu
2022-02-08 17:39   ` Ferruh Yigit
2022-02-09  2:38     ` Jiawen Wu [this message]
2022-02-08 10:11 ` [PATCH 6/9] net/ngbe: add support to custom PHY interfaces Jiawen Wu
2022-02-08 17:41   ` Ferruh Yigit
2022-02-09  6:17     ` Jiawen Wu
2022-02-08 10:11 ` [PATCH 7/9] net: add LED OEM support for wangxun devices Jiawen Wu
2022-02-08 17:41   ` Ferruh Yigit
2022-02-08 10:11 ` [PATCH 8/9] net/txgbe: fix to set link up and down Jiawen Wu
2022-02-08 10:11 ` [PATCH 9/9] net/txgbe: fix KR auto-negotiation Jiawen Wu

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='014c01d81d5e$20b00ed0$62102c70$@trustnetic.com' \
    --to=jiawenwu@trustnetic.com \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ktraynor@redhat.com \
    /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).