patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"3chas3@gmail.com" <3chas3@gmail.com>,
	 "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH v3 1/2] net/ixgbe: fix x550 code to handle unidentified PHY
Date: Mon, 05 Nov 2018 18:08:29 +0000	[thread overview]
Message-ID: <1541441309.9009.13.camel@debian.org> (raw)
In-Reply-To: <039ED4275CED7440929022BC67E70611532DF9A9@SHSMSX103.ccr.corp.intel.com>

On Mon, 2018-11-05 at 17:41 +0000, Zhang, Qi Z wrote:
> > -----Original Message-----
> > From: Luca Boccassi [mailto:bluca@debian.org]
> > Sent: Friday, November 2, 2018 8:19 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> > 3chas3@gmail.com; Luca Boccassi <bluca@debian.org>; stable@dpdk.org
> > Subject: [PATCH v3 1/2] net/ixgbe: fix x550 code to handle
> > unidentified PHY
> > 
> > ixgbe_identify_sfp_module_X550em() was missing the code to handle
> > unidentified PHY that has been there in 82599 so it was not able to
> > complete
> > initialization of ixgbe sequence if no sfp plugged in.
> > Port it over to return an appropriate type and complete init
> > sequence
> > properly.
> > 
> > Fixes: d2e72774e58c ("ixgbe/base: support X550")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> > v2: refresh to remove merge conflict with master
> > v3: coalesce fix into ixgbe_identify_sfp_module_X550em to avoid
> >     code duplication, improve comment
> > 
> >  drivers/net/ixgbe/base/ixgbe_x550.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c
> > b/drivers/net/ixgbe/base/ixgbe_x550.c
> > index f7b98af52..a88d5c86a 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_x550.c
> > +++ b/drivers/net/ixgbe/base/ixgbe_x550.c
> > @@ -1561,6 +1561,12 @@ s32 ixgbe_identify_sfp_module_X550em(struct
> > ixgbe_hw *hw)
> > 
> >  	status = ixgbe_identify_module_generic(hw);
> > 
> > +	/* Set PHY type none if no PHY detected to allow init
> > without SFP */
> > +	if (hw->phy.type == ixgbe_phy_unknown) {
> > +		hw->phy.type = ixgbe_phy_none;
> 
> Set PHY type to none for a device that does have PHY looks weird.  
> does ixgeb_phy_generic works here?
> 
> Where is failure you met with ixgbe_phy_unknown?

Yes it is a bit weird, but it works :-)

The issue is that the PMD fails to initialise when there is no SFP
plugged, and then it will always stay in that failed state when an SFP
is later plugged in, and it won't work until the machine is rebooted
with the SFP plugged in.

The logs (with an older DPDK version):

PMD: eth_ixgbe_dev_init(): Hardware Initialization Failure: -20
EAL: Requested device 0000:04:00.0 cannot be used

The kernel driver didn't like it either:

[    7.579782] ixgbe 0000:04:00.0: Multiqueue Enabled: Rx Queue count = 8, Tx Queue count = 8
[    7.649766] ixgbe 0000:04:00.0: MAC: 5, PHY: 0, PBA No: 020A00-000
[    7.649774] ixgbe 0000:04:00.0: 00:25:90:5e:05:20
[    8.763790] ixgbe 0000:04:00.0 0000:04:00.0 (uninitialized): CS4227 reset did not complete
[    8.772051] ixgbe 0000:04:00.0 0000:04:00.0 (uninitialized): CS4227 reset failed: -3
[    9.059374] ixgbe 0000:04:00.0: Intel(R) 10 Gigabit Network Connection

But with the kernel driver, if an SFP is plugged in later then the
interface works correctly.

With this series, an SFP can be plugged in after booting and
initialising the DPDK application.

-- 
Kind regards,
Luca Boccassi

  reply	other threads:[~2018-11-05 18:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15 17:09 [dpdk-stable] [PATCH " Luca Boccassi
2018-08-15 17:09 ` [dpdk-stable] [PATCH 2/2] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-09-26 10:22 ` [dpdk-stable] [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Luca Boccassi
2018-11-01 14:04 ` Luca Boccassi
2018-11-01 14:04   ` [dpdk-stable] [PATCH 2/2] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-11-01 14:41   ` [dpdk-stable] [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Luca Boccassi
2018-11-02 14:11   ` Zhang, Qi Z
2018-11-02 15:21     ` Luca Boccassi
2018-11-02 16:49       ` Zhang, Qi Z
2018-11-02 17:08         ` Luca Boccassi
2018-11-02 15:18 ` [dpdk-stable] [PATCH v3 " Luca Boccassi
2018-11-02 15:18   ` [dpdk-stable] [PATCH v3 2/2] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-11-05 17:41   ` [dpdk-stable] [PATCH v3 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Zhang, Qi Z
2018-11-05 18:08     ` Luca Boccassi [this message]
2018-11-05 18:18     ` Chas Williams
2018-11-06 23:31       ` Zhang, Qi Z
2018-11-07 12:55         ` Luca Boccassi
2018-11-07 18:27           ` Zhang, Qi Z
2018-11-09 13:18             ` Luca Boccassi
2018-11-20 11:28               ` Luca Boccassi
2018-11-20 11:27   ` [dpdk-stable] [PATCH v4] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-11-20 19:52     ` Zhang, Qi Z
2018-11-20 21:08       ` Luca Boccassi
2018-11-22 17:54         ` Zhang, Qi Z

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=1541441309.9009.13.camel@debian.org \
    --to=bluca@debian.org \
    --cc=3chas3@gmail.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.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).