From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 6E1EC5B3C; Fri, 2 Nov 2018 15:11:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2018 07:11:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,456,1534834800"; d="scan'208";a="82907620" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga007.fm.intel.com with ESMTP; 02 Nov 2018 07:11:53 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 2 Nov 2018 07:11:53 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 2 Nov 2018 07:11:52 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.161]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.117]) with mapi id 14.03.0415.000; Fri, 2 Nov 2018 22:11:50 +0800 From: "Zhang, Qi Z" To: Luca Boccassi , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Ananyev, Konstantin" , "stable@dpdk.org" Thread-Topic: [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Thread-Index: AQHUcevoXY9R4uY9OkaRi00XWzJbmKU8h7Og Date: Fri, 2 Nov 2018 14:11:50 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532DEB42@SHSMSX103.ccr.corp.intel.com> References: <20180815170932.23536-1-bluca@debian.org> <20181101140413.18665-1-bluca@debian.org> In-Reply-To: <20181101140413.18665-1-bluca@debian.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzAxMGE0OWItZDNiYi00MmQzLTgxNWItM2M0M2NjNDJlOGIxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUUNSSzU0YjJoSmJQVWIyNGZRc1ZYZ0RZY3pIRkJJSGVQYWphS2JKOTVuQlwvaTFybWxweHNQUEJBM1E3Z2RjS3gifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 14:11:55 -0000 > -----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 initializ= ation > 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 > drivers/net/ixgbe/base/ixgbe_x550.c | 19 ++++++++++++++++--- > 1 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) > */ > STATIC s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) { > + s32 status; > + > hw->mac.ops.set_lan_id(hw); >=20 > ixgbe_read_mng_if_sel_x550em(hw); >=20 > switch (hw->device_id) { > 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; > + } Why this can't be handled at caller, why we replace phy_unknown by phy_none= only for x550? > + return status; > case IXGBE_DEV_ID_X550EM_X_SFP: > /* set up for CS4227 usage */ > ixgbe_setup_mux_ctl(hw); > @@ -329,8 +337,13 @@ STATIC s32 ixgbe_identify_phy_x550em(struct > ixgbe_hw *hw) > /* Fallthrough */ >=20 > case IXGBE_DEV_ID_X550EM_A_SFP_N: > - return ixgbe_identify_sfp_module_X550em(hw); > - break; > + 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; > + } > + return status; > case IXGBE_DEV_ID_X550EM_X_KX4: > hw->phy.type =3D ixgbe_phy_x550em_kx4; > break; > -- > 2.19.1