patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Wei Dai <wei.dai@intel.com>
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/ixgbe/base: fix setting unsupported autoneg speeds' has been queued to stable release 16.11.1
Date: Mon, 23 Jan 2017 15:47:13 +0800	[thread overview]
Message-ID: <1485157675-32114-38-git-send-email-yuanhan.liu@linux.intel.com> (raw)
In-Reply-To: <1485157675-32114-1-git-send-email-yuanhan.liu@linux.intel.com>

Hi,

FYI, your patch has been queued to stable release 16.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
yet. It will be pushed if I get no objections before 01/28/17.
So please shout if anyone has objections.

---

Note 16.11 is a LTS release. v16.11.1 is planned to be released
shortly (about 2-3 weeks) after v17.02.

---

Thanks.

	--yliu

---
>From 2f00a50a5d595f9fd750a915f08d59961abac7d6 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Wed, 21 Dec 2016 17:47:58 +0800
Subject: [PATCH] net/ixgbe/base: fix setting unsupported autoneg speeds

[ upstream commit 222c65194151bd68803adb311635e078323f7e0a ]

Update ixgbe_setup_phy_link_generic that set/unset auto-negotiation.
Ensure that unsupported auto-negotiation speeds are unset.

This is necessary since the PHY NVM may advertise unsupported speeds.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c | 130 +++++++++++++++----------------------
 1 file changed, 51 insertions(+), 79 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 1d9fb3e..54e45b2 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -787,91 +787,63 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)
 
 	ixgbe_get_copper_link_capabilities_generic(hw, &speed, &autoneg);
 
-	if (speed & IXGBE_LINK_SPEED_10GB_FULL) {
-		/* Set or unset auto-negotiation 10G advertisement */
-		hw->phy.ops.read_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG,
-				     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				     &autoneg_reg);
-
-		autoneg_reg &= ~IXGBE_MII_10GBASE_T_ADVERTISE;
-		if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL)
-			autoneg_reg |= IXGBE_MII_10GBASE_T_ADVERTISE;
-
-		hw->phy.ops.write_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG,
-				      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				      autoneg_reg);
-	}
-
-	if (hw->mac.type == ixgbe_mac_X550) {
-		if (speed & IXGBE_LINK_SPEED_5GB_FULL) {
-			/* Set or unset auto-negotiation 5G advertisement */
-			hw->phy.ops.read_reg(hw,
-				IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				&autoneg_reg);
-
-			autoneg_reg &= ~IXGBE_MII_5GBASE_T_ADVERTISE;
-			if (hw->phy.autoneg_advertised &
-			     IXGBE_LINK_SPEED_5GB_FULL)
-				autoneg_reg |= IXGBE_MII_5GBASE_T_ADVERTISE;
-
-			hw->phy.ops.write_reg(hw,
-				IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				autoneg_reg);
-		}
+	/* Set or unset auto-negotiation 10G advertisement */
+	hw->phy.ops.read_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG,
+			     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			     &autoneg_reg);
 
-		if (speed & IXGBE_LINK_SPEED_2_5GB_FULL) {
-			/* Set or unset auto-negotiation 2.5G advertisement */
-			hw->phy.ops.read_reg(hw,
-				IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				&autoneg_reg);
-
-			autoneg_reg &= ~IXGBE_MII_2_5GBASE_T_ADVERTISE;
-			if (hw->phy.autoneg_advertised &
-			    IXGBE_LINK_SPEED_2_5GB_FULL)
-				autoneg_reg |= IXGBE_MII_2_5GBASE_T_ADVERTISE;
-
-			hw->phy.ops.write_reg(hw,
-				IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				autoneg_reg);
-		}
-	}
+	autoneg_reg &= ~IXGBE_MII_10GBASE_T_ADVERTISE;
+	if ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL) &&
+	    (speed & IXGBE_LINK_SPEED_10GB_FULL))
+		autoneg_reg |= IXGBE_MII_10GBASE_T_ADVERTISE;
 
-	if (speed & IXGBE_LINK_SPEED_1GB_FULL) {
-		/* Set or unset auto-negotiation 1G advertisement */
-		hw->phy.ops.read_reg(hw,
-				     IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				     &autoneg_reg);
+	hw->phy.ops.write_reg(hw, IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG,
+			      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			      autoneg_reg);
 
-		autoneg_reg &= ~IXGBE_MII_1GBASE_T_ADVERTISE;
-		if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL)
-			autoneg_reg |= IXGBE_MII_1GBASE_T_ADVERTISE;
+	hw->phy.ops.read_reg(hw, IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
+			     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			     &autoneg_reg);
 
-		hw->phy.ops.write_reg(hw,
-				      IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
-				      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				      autoneg_reg);
+	if (hw->mac.type == ixgbe_mac_X550) {
+		/* Set or unset auto-negotiation 5G advertisement */
+		autoneg_reg &= ~IXGBE_MII_5GBASE_T_ADVERTISE;
+		if ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_5GB_FULL) &&
+		    (speed & IXGBE_LINK_SPEED_5GB_FULL))
+			autoneg_reg |= IXGBE_MII_5GBASE_T_ADVERTISE;
+
+		/* Set or unset auto-negotiation 2.5G advertisement */
+		autoneg_reg &= ~IXGBE_MII_2_5GBASE_T_ADVERTISE;
+		if ((hw->phy.autoneg_advertised &
+		     IXGBE_LINK_SPEED_2_5GB_FULL) &&
+		    (speed & IXGBE_LINK_SPEED_2_5GB_FULL))
+			autoneg_reg |= IXGBE_MII_2_5GBASE_T_ADVERTISE;
 	}
 
-	if (speed & IXGBE_LINK_SPEED_100_FULL) {
-		/* Set or unset auto-negotiation 100M advertisement */
-		hw->phy.ops.read_reg(hw, IXGBE_MII_AUTONEG_ADVERTISE_REG,
-				     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				     &autoneg_reg);
-
-		autoneg_reg &= ~(IXGBE_MII_100BASE_T_ADVERTISE |
-				 IXGBE_MII_100BASE_T_ADVERTISE_HALF);
-		if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL)
-			autoneg_reg |= IXGBE_MII_100BASE_T_ADVERTISE;
-
-		hw->phy.ops.write_reg(hw, IXGBE_MII_AUTONEG_ADVERTISE_REG,
-				      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
-				      autoneg_reg);
-	}
+	/* Set or unset auto-negotiation 1G advertisement */
+	autoneg_reg &= ~IXGBE_MII_1GBASE_T_ADVERTISE;
+	if ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL) &&
+	    (speed & IXGBE_LINK_SPEED_1GB_FULL))
+		autoneg_reg |= IXGBE_MII_1GBASE_T_ADVERTISE;
+
+	hw->phy.ops.write_reg(hw, IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG,
+			      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			      autoneg_reg);
+
+	/* Set or unset auto-negotiation 100M advertisement */
+	hw->phy.ops.read_reg(hw, IXGBE_MII_AUTONEG_ADVERTISE_REG,
+			     IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			     &autoneg_reg);
+
+	autoneg_reg &= ~(IXGBE_MII_100BASE_T_ADVERTISE |
+			 IXGBE_MII_100BASE_T_ADVERTISE_HALF);
+	if ((hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL) &&
+	    (speed & IXGBE_LINK_SPEED_100_FULL))
+		autoneg_reg |= IXGBE_MII_100BASE_T_ADVERTISE;
+
+	hw->phy.ops.write_reg(hw, IXGBE_MII_AUTONEG_ADVERTISE_REG,
+			      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,
+			      autoneg_reg);
 
 	/* Blocked by MNG FW so don't reset PHY */
 	if (ixgbe_check_reset_blocked(hw))
-- 
1.9.0

  parent reply	other threads:[~2017-01-23  7:46 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  7:46 [dpdk-stable] patch 'pmdinfogen: fix endianness with cross-compilation' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'pci: fix check of mknod' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: check maximum number of queues for statistics' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'mempool: fix API documentation' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: fix port lookup if none' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'vdev: fix detaching with alias' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ethtool: fix driver information' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: remove invalid function from version map' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'ethdev: fix extended statistics name index' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'pmdinfogen: fix null dereference' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'app/testpmd: fix static build link ordering' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'app/testpmd: fix check for invalid ports' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ip_pipeline: fix coremask limitation' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'examples/ip_pipeline: fix parsing of pass-through pipeline' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: fix xstats value mapping' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/mlx5: fix leak when starvation occurs' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/mlx5: fix endianness in Tx completion queue' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: fix logging for Tx free threshold check' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e: enable auto link update for 25G' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40evf: fix casting between structs' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix flow control set for 25G' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix bit test mask' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix long link down notification time' " Yuanhan Liu
2017-01-23  7:46 ` [dpdk-stable] patch 'net/i40e/base: fix unknown PHYs incorrect identification' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix WoL failure on PF reset' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix NVM access interfering' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix division by zero' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e/base: fix byte order' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix resource leak' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/pcap: fix timestamps in output pcap file' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/vmxnet3: fix Rx deadlock' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/nfp: fix typo in Tx offload capabilities' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix PHY reset check for x550em-ext' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix clearing SAN MAC address' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix PHY identification for x550a' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix getting PHY type for some x550 devices' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix SGMII link setup for M88 PHYs' " Yuanhan Liu
2017-01-23  7:47 ` Yuanhan Liu [this message]
2017-01-23  7:47 ` [dpdk-stable] patch 'net/ixgbe/base: fix IXGBE LSWFW register' " Yuanhan Liu
     [not found]   ` <49759EB36A64CF4892C1AFEC9231E8D63A354E36@PGSMSX106.gar.corp.intel.com>
2017-01-23  9:44     ` Yuanhan Liu
2017-01-23 10:17       ` Thomas Monjalon
2017-01-23 10:29       ` Mcnamara, John
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix filtering code' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: add vendor/device id info' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix SRIOV printouts' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix multiple acquisition requests by VF' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix error code in resc allocation' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix mutex in freeing context manager' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix Rx queue access by malicious VFs' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix to handle acquire request from VF' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede/base: fix VF over legacy PF' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix RSS hash result for flows' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix wrong return value when handling PF message' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix missing inline attributes' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx5: fix Tx doorbell' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix PF fastpath status block index' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix per queue statisitics' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/af_packet: fix fd use after free' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix segment number in reassemble process' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/enic: remove unnecessary function parameter attributes' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/nfp: fix VLAN offload flags check' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/cxgbe: fix parenthesis on bitwise operation' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/qede: fix function declaration' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/mlx: fix IPv4 and IPv6 packet type' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/i40e: fix VF reset flow' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'cryptodev: fix crash on null dereference' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/openssl: fix extra bytes written at end of data' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_mb: fix incorrect crypto session' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix J0 padding bytes' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/aesni_gcm: fix IV size in capabilities' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/qat: " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'cryptodev: fix loop in device query' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'crypto/openssl: fix indentation in guide' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'app/test: fix symmetric session free in crypto perf tests' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'vhost: fix guest/host physical address mapping' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'vhost: fix memory leak' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/vhost: fix socket file deleted on stop' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'examples/vhost: fix calculation of mbuf count' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'examples/vhost: fix lcore initialization' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'examples/ethtool: fix querying non-PCI devices' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio-user: fix wrongly get/set features' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio-user: fix not properly reset device' " Yuanhan Liu
2017-01-23  7:47 ` [dpdk-stable] patch 'net/virtio: fix rewriting LSC flag' " Yuanhan Liu

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=1485157675-32114-38-git-send-email-yuanhan.liu@linux.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=stable@dpdk.org \
    --cc=wei.dai@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).