From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 97544559A; Thu, 1 Nov 2018 15:04:32 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id x12-v6so20198256wrw.8; Thu, 01 Nov 2018 07:04:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t9rbgefZa+FKltzT6l0uoUYF9+Rj44108VO9Ktb7DyY=; b=tBsKFLsDGs65V9C6p8NFjG8veg/aOX48ywiD67lWIh7vCG9rwKR8D1PXunm3wIuStY JSEDoJVJsy/wtORMmnMiugpEHOu07IG5x2j/u+XhoJ97DVDbZe/Vym/Clt+kCEhHQRg0 fZGIY0D83ykSFMOcizVu70KuAPnNHngdOUvoUTpENDXIHPH+bl9vGo/AG6+2FLVyeuwD oCwwMaV1dVyQ6CkxNkZjpLR8zx4IJX9tpaGBXNF8TM5uEVm2KIa+0AlrWFpYheDnuZfc +oFLuPiE2T5JJi+obXymw7zyT/zAhnclD4NPR40udTv9cF7qZ08ddWvj5pJ5rsJIGZ4j /ioA== X-Gm-Message-State: AGRZ1gKaXHD/XFDYG21Xfqki+xYfXycw/eS3afX1PIyiS4YfIFL8zpuI G5WB3a2PIYddaiT6ub3qnD7Fn2oBNdc= X-Google-Smtp-Source: AJdET5ektvw8s/s15U98QszqHsI8JUmLg0+/uW2cwi8D8f1RD50Iynzef30pkG7cuw0ZplDBdwfnGQ== X-Received: by 2002:a5d:5012:: with SMTP id e18-v6mr6074591wrt.99.1541081071789; Thu, 01 Nov 2018 07:04:31 -0700 (PDT) Received: from localhost ([2001:1be0:110d:fcfe:70c5:32f6:c5b6:39e6]) by smtp.gmail.com with ESMTPSA id b8-v6sm11014302wrt.49.2018.11.01.07.04.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Nov 2018 07:04:30 -0700 (PDT) From: Luca Boccassi To: dev@dpdk.org Cc: wenzhuo.lu@intel.com, konstantin.ananyev@intel.com, qi.z.zhang@intel.com, Luca Boccassi , stable@dpdk.org Date: Thu, 1 Nov 2018 14:04:12 +0000 Message-Id: <20181101140413.18665-1-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20180815170932.23536-1-bluca@debian.org> References: <20180815170932.23536-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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: Thu, 01 Nov 2018 14:04:32 -0000 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. Fixes: d2e72774e58c ("ixgbe/base: support X550") Cc: stable@dpdk.org Signed-off-by: Luca Boccassi --- v2: refresh to remove merge conflict with master drivers/net/ixgbe/base/ixgbe_x550.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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); ixgbe_read_mng_if_sel_x550em(hw); switch (hw->device_id) { case IXGBE_DEV_ID_X550EM_A_SFP: - return ixgbe_identify_sfp_module_X550em(hw); + status = ixgbe_identify_sfp_module_X550em(hw); + /* Set PHY type none if no PHY detected */ + if (hw->phy.type == ixgbe_phy_unknown) { + hw->phy.type = ixgbe_phy_none; + return IXGBE_SUCCESS; + } + 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 */ case IXGBE_DEV_ID_X550EM_A_SFP_N: - return ixgbe_identify_sfp_module_X550em(hw); - break; + status = ixgbe_identify_sfp_module_X550em(hw); + /* Set PHY type none if no PHY detected */ + if (hw->phy.type == ixgbe_phy_unknown) { + hw->phy.type = ixgbe_phy_none; + return IXGBE_SUCCESS; + } + return status; case IXGBE_DEV_ID_X550EM_X_KX4: hw->phy.type = ixgbe_phy_x550em_kx4; break; -- 2.19.1