From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by dpdk.org (Postfix) with ESMTP id 85B854F91; Mon, 5 Nov 2018 19:18:51 +0100 (CET) Received: by mail-qk1-f193.google.com with SMTP id y16so15252488qki.7; Mon, 05 Nov 2018 10:18:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=EheM18eyt6KKbUvC1dfBaA8Goo3uaHJTPgwsEU2upng=; b=QpeRZv/j6MEtggW2Ry551uyFS0gNIDLNUDNfCpFEPgeWjFSI+osBfzjmP0XQIX0euw qxh1E2KBhvz3/Ghs1FrwIO/h9+I2mOpTJZuepjFa/wjwrhM0bT5N4RShpPgI5THxL63M 6mmOIv6jlqRagftVo+B4RiFrqdNtX3Hujx7+t/Y6DDI4Wx1Nckh1Bc0oWwV/8S05ob1/ 0MHZaO7JBySFZ0W/BXoN3XEe/XPPF7afFxV5RyHcwCW6mPPv0cewsHaIRxbLByZZARlS hF3IBMNy/1B7b4q/hCZZcPwkbRZtZvQPUwijG2IsjlD2r80b8To4Ahd0JAWs2lhcRPU9 zJ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EheM18eyt6KKbUvC1dfBaA8Goo3uaHJTPgwsEU2upng=; b=I1JsbMu9mOxjEsyUHW7WPIRwTb3gr1R0KkaDQdbDlnjX4zFxxeHK5jhFvBu6c5Od8H 195sAIc52tIlvNHCblyuKhG2NBntuClaofXEbXGTHtgwBysOeODbHh4N5rhnL1igJ1bz c8qK8tdva9P6RZ0Fsw+LAOCmWXju/4mlV/qJ7SFH2AurJieySoiuT4NstrB9Vq1xSqNs E5UULJZIzodUVr+Pm9fankApVnQZbxtGVmbzIYCYvYW9OwJfYboZj7d8z0BHIRIzLSEF W1TeFdbWey8yjjfnkrEfuDJc29dXk+4fXWoi/7XkyU55StA3muuPV98owlrLOWSSf8U7 H8Eg== X-Gm-Message-State: AGRZ1gJYI3KSxESX0idkkVN+EJEblvXVBxTSWjHJXuOTQFkK5JkLm+3Z wdCJ2UZdee8wjP0mBcVLY+Nc0E/C X-Google-Smtp-Source: AJdET5eNixEpXpjfv0Gp8lW7zBODGWlamsepRy9rYIgODOaAXQmUNp3TfLVMVysu0EWt2Dr8r+eg6w== X-Received: by 2002:a37:1a25:: with SMTP id a37mr21619029qka.197.1541441930715; Mon, 05 Nov 2018 10:18:50 -0800 (PST) Received: from [192.168.1.10] (pool-96-255-82-34.washdc.fios.verizon.net. [96.255.82.34]) by smtp.gmail.com with ESMTPSA id a68sm37378048qkj.63.2018.11.05.10.18.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 10:18:50 -0800 (PST) To: "Zhang, Qi Z" , Luca Boccassi , "dev@dpdk.org" Cc: "Lu, Wenzhuo" , "Ananyev, Konstantin" , "stable@dpdk.org" References: <20180815170932.23536-1-bluca@debian.org> <20181102151848.18024-1-bluca@debian.org> <039ED4275CED7440929022BC67E70611532DF9A9@SHSMSX103.ccr.corp.intel.com> From: Chas Williams <3chas3@gmail.com> Message-ID: <494f9ba9-cadc-aa36-2b17-42890dbe5c74@gmail.com> Date: Mon, 5 Nov 2018 13:18:49 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <039ED4275CED7440929022BC67E70611532DF9A9@SHSMSX103.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 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: Mon, 05 Nov 2018 18:18:51 -0000 On 11/05/2018 12:41 PM, 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 ; Ananyev, Konstantin >> ; Zhang, Qi Z ; >> 3chas3@gmail.com; Luca Boccassi ; 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 >> --- >> 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? Yes, it does seem strange but that's what ixgbe_identify_sfp_module_generic seems to do: err_read_i2c_eeprom: hw->phy.sfp_type = ixgbe_sfp_type_not_present; if (hw->phy.type != ixgbe_phy_nl) { hw->phy.id = 0; hw->phy.type = ixgbe_phy_unknown; } The QSFP version a little more forceful: err_read_i2c_eeprom: hw->phy.sfp_type = ixgbe_sfp_type_not_present; hw->phy.id = 0; hw->phy.type = ixgbe_phy_unknown; If we go forward without setting the phy_type to none, we will eventually run into issues calling other phy routines. So should a lack of SFP, reset the PHY type? It's hazy because the difference between PHY and SFP isn't that clear to me here. > Where is failure you met with ixgbe_phy_unknown? > >> + return IXGBE_SUCCESS; >> + } >> + >> if (status != IXGBE_SUCCESS) >> return status; >> >> -- >> 2.19.1 >