patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Robin Zhang <robinx.zhang@intel.com>
To: dev@dpdk.org
Cc: beilei.xing@intel.com, junfeng.guo@intel.com,
	stevex.yang@intel.com, Robin Zhang <robinx.zhang@intel.com>,
	stable@dpdk.org, Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Subject: [dpdk-stable] [PATCH 08/14] net/i40e/base: fix update link data for X722
Date: Fri, 18 Jun 2021 06:38:45 +0000
Message-ID: <20210618063851.3694702-9-robinx.zhang@intel.com> (raw)
In-Reply-To: <20210618063851.3694702-1-robinx.zhang@intel.com>

The X722 card has 'Link Type' information elsewhere than the X710.
Previously, for all cards, the 'Link Type' information was retrieved by
opcode 0x0607 and this value was wrong for all X722 cards.
Now this information for X722 only is taken by opcode 0x0600
(function: i40e_aq_get_phy_capabilities) instead of an opcode
0x0607 (function: i40e_aq_get_link_info).
All other parameters read by opcode 0x0607 unchanged.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time")
Cc: stable@dpdk.org

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa424e6010..ef061a6b63 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
+	/* 'Get Link Status' response data structure from X722 FW has
+	 * different format and does not contain this information
+	 */
 	if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
 	    hw->mac.type != I40E_MAC_X722) {
 		__le32 tmp;
@@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
 		return status;
 
 	/* extra checking needed to ensure link info to user is timely */
-	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
-	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
-	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
-		status = i40e_aq_get_phy_capabilities(hw, false, false,
+	if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	     ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	      !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) ||
+		hw->mac.type == I40E_MAC_X722) {
+		status = i40e_aq_get_phy_capabilities(hw, false,
+						      hw->mac.type ==
+						      I40E_MAC_X722,
 						      &abilities, NULL);
 		if (status)
 			return status;
-- 
2.25.1


  parent reply	other threads:[~2021-06-18  6:49 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210618063851.3694702-1-robinx.zhang@intel.com>
2021-06-18  6:38 ` [dpdk-stable] [PATCH 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-06-18  6:38 ` [dpdk-stable] [PATCH 07/14] net/i40e/base: fix PF reset failed Robin Zhang
2021-06-18  6:38 ` Robin Zhang [this message]
2021-06-18  6:38 ` [dpdk-stable] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-06-18  6:38 ` [dpdk-stable] [PATCH 12/14] net/i40e/base: fix headers to match functions Robin Zhang
2021-06-18  6:38 ` [dpdk-stable] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
2021-06-21  6:52   ` Xing, Beilei
     [not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 07/14] net/i40e/base: fix PF reset failed Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 08/14] net/i40e/base: fix update link data for X722 Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 12/14] net/i40e/base: fix headers to match functions Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
     [not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 07/15] net/i40e/base: fix PF reset failed Robin Zhang
2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 08/15] net/i40e/base: fix update link data for X722 Robin Zhang
2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 12/15] net/i40e/base: fix headers to match functions Robin Zhang
2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
     [not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-09-29 16:21     ` Ferruh Yigit
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang
2021-09-29 16:21     ` Ferruh Yigit
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 07/18] net/i40e/base: fix update link data for X722 Robin Zhang
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-09-29 16:21     ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang
2021-09-29 15:59     ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
     [not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 06/17] net/i40e/base: fix PF reset Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 08/17] net/i40e/base: fix AOC media type Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 10/17] net/i40e/base: fix headers to match functions Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang
     [not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 06/17] net/i40e/base: fix PF reset Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 08/17] net/i40e/base: fix AOC media type Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 10/17] net/i40e/base: fix headers to match functions Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang

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=20210618063851.3694702-9-robinx.zhang@intel.com \
    --to=robinx.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jaroslawx.gawin@intel.com \
    --cc=junfeng.guo@intel.com \
    --cc=stable@dpdk.org \
    --cc=stevex.yang@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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git