From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 0ED44559A; Fri, 2 Nov 2018 16:21:08 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id w7-v6so2310539wmc.1; Fri, 02 Nov 2018 08:21:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=St7mvQnoFTvJt5QwSZSUcpD18EaPsrh4kirWhnaqC1A=; b=TaAXfrIevHKR98XW4Uy1OQ1iPU0kNY7Rt1m+wM/xIbCCO3szajlHGZqL/GWnZpWP6j mM+IyXfDrS/ZGfXST9mnmZ5vJCPfm/nveyu2b82p1a3MN92J066aBDUsrE5GsbdlglV/ JOOsUvbTgKySsMltF1EYQQM8tSSM/X8mqx0f3dyh5hB3e7DsEbFvBIxyk9v08z7QPgOf +4SPgP5i2HIzVzAjVbfBDLAFuc/3WUJhGaoOa1ONAY4xS1VlywAo/aS+ABROkRbxde4j iu0/wrVHE8iq1IiQ7oOBGA6mFaqYnsPK6RaEmOGw4vSP4eFh4+HnYhfxiHQgDBzM/YlP Cz5w== X-Gm-Message-State: AGRZ1gIsTa+qW9FyNZLdlog1AGLpMACQt+A68zQJGDUzAofBEzPPn/Nw x+z6u62Y33TpAXXL5o0d1y4= X-Google-Smtp-Source: AJdET5ffbL8SfvAnEm4aIkTGgtnGanGwGe+T65Ehq4sg837dNNTRndwhcYm+NzuDTnu7mwiwNrREuw== X-Received: by 2002:a1c:545e:: with SMTP id p30-v6mr94000wmi.69.1541172067605; Fri, 02 Nov 2018 08:21:07 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id a4-v6sm12019493wrs.67.2018.11.02.08.21.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 08:21:06 -0700 (PDT) Message-ID: <1541172065.4849.22.camel@debian.org> From: Luca Boccassi To: "Zhang, Qi Z" , "dev@dpdk.org" Cc: "Lu, Wenzhuo" , "Ananyev, Konstantin" , "stable@dpdk.org" Date: Fri, 02 Nov 2018 15:21:05 +0000 In-Reply-To: <039ED4275CED7440929022BC67E70611532DEB42@SHSMSX103.ccr.corp.intel.com> References: <20180815170932.23536-1-bluca@debian.org> <20181101140413.18665-1-bluca@debian.org> <039ED4275CED7440929022BC67E70611532DEB42@SHSMSX103.ccr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2018 15:21:08 -0000 On Fri, 2018-11-02 at 14:11 +0000, Zhang, Qi Z wrote: > > -----Original Message----- > > From: Luca Boccassi [mailto:bluca@debian.org] > > Sent: Thursday, November 1, 2018 9:04 AM > > To: dev@dpdk.org > > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > > ; Zhang, Qi Z ; > > Luca > > Boccassi ; stable@dpdk.org > > Subject: [PATCH 1/2] net/ixgbe: fix x550 code to handle > > unidentified PHY > >=20 > > ixgbe_identify_phy_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. > >=20 > > Fixes: d2e72774e58c ("ixgbe/base: support X550") > > Cc: stable@dpdk.org > >=20 > > Signed-off-by: Luca Boccassi > > --- > > v2: refresh to remove merge conflict with master > >=20 > > =C2=A0drivers/net/ixgbe/base/ixgbe_x550.c | 19 ++++++++++++++++--- > > =C2=A01 file changed, 16 insertions(+), 3 deletions(-) > >=20 > > diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c > > b/drivers/net/ixgbe/base/ixgbe_x550.c > > index f7b98af52..83b394861 100644 > > --- a/drivers/net/ixgbe/base/ixgbe_x550.c > > +++ b/drivers/net/ixgbe/base/ixgbe_x550.c > > @@ -315,13 +315,21 @@ STATIC void ixgbe_setup_mux_ctl(struct > > ixgbe_hw > > *hw) > > =C2=A0 */ > > =C2=A0STATIC s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw)=C2=A0= =C2=A0{ > > + s32 status; > > + > > =C2=A0 hw->mac.ops.set_lan_id(hw); > >=20 > > =C2=A0 ixgbe_read_mng_if_sel_x550em(hw); > >=20 > > =C2=A0 switch (hw->device_id) { > > =C2=A0 case IXGBE_DEV_ID_X550EM_A_SFP: > > - return ixgbe_identify_sfp_module_X550em(hw); > > + status =3D ixgbe_identify_sfp_module_X550em(hw); > > + /* Set PHY type none if no PHY detected */ > > + if (hw->phy.type =3D=3D ixgbe_phy_unknown) { > > + hw->phy.type =3D ixgbe_phy_none; > > + return IXGBE_SUCCESS; > > + } >=20 > Why this can't be handled at caller, why we replace phy_unknown by > phy_none only for x550? Hi, thanks for the review. I've moved the code into the caller in v3. It's done for x550 simply because that's the hardware that we have and that this was tested with, I didn't want to take extra risks. It's also the hardware that our customer reported the issue with. --=20 Kind regards, Luca Boccassi