DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wei Dai <wei.dai@intel.com>
To: dev@dpdk.org
Cc: helin.zhang@intel.com, konstantin.ananyev@intel.com,
	Wei Dai <wei.dai@intel.com>
Subject: [dpdk-dev] [PATCH v2 27/30] net/ixgbe/base: remove unused EEE code
Date: Wed, 21 Dec 2016 17:48:11 +0800	[thread overview]
Message-ID: <1482313694-31602-28-git-send-email-wei.dai@intel.com> (raw)
In-Reply-To: <1482313694-31602-1-git-send-email-wei.dai@intel.com>

Remove unused old Energy Efficient Ethernet (EEE) code.

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_x550.c | 113 +-----------------------------------
 drivers/net/ixgbe/base/ixgbe_x550.h |   2 -
 2 files changed, 1 insertion(+), 114 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 2aaed6b..4a98530 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -942,6 +942,7 @@ s32 ixgbe_init_ops_X550EM_x(struct ixgbe_hw *hw)
 				      ixgbe_write_i2c_combined_generic_unlocked;
 	link->addr = IXGBE_CS4227;
 
+
 	return ret_val;
 }
 
@@ -1109,118 +1110,6 @@ s32 ixgbe_init_eeprom_params_X550(struct ixgbe_hw *hw)
 }
 
 /**
- * ixgbe_enable_eee_x550 - Enable EEE support
- * @hw: pointer to hardware structure
- */
-STATIC s32 ixgbe_enable_eee_x550(struct ixgbe_hw *hw)
-{
-	u32 link_reg;
-	s32 status;
-
-	switch (hw->device_id) {
-	case IXGBE_DEV_ID_X550EM_A_KR:
-	case IXGBE_DEV_ID_X550EM_A_KR_L:
-		status = hw->mac.ops.read_iosf_sb_reg(hw,
-					IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
-					IXGBE_SB_IOSF_TARGET_KR_PHY, &link_reg);
-		if (status != IXGBE_SUCCESS)
-			return status;
-
-		link_reg |= IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KR |
-			    IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KX;
-
-		/* Don't advertise FEC capability when EEE enabled. */
-		link_reg &= ~IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_FEC;
-
-		status = hw->mac.ops.write_iosf_sb_reg(hw,
-					IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
-					IXGBE_SB_IOSF_TARGET_KR_PHY, link_reg);
-		if (status != IXGBE_SUCCESS)
-			return status;
-		break;
-	default:
-		break;
-	}
-
-	return IXGBE_SUCCESS;
-}
-
-/**
- * ixgbe_disable_eee_x550 - Disable EEE support
- * @hw: pointer to hardware structure
- */
-STATIC s32 ixgbe_disable_eee_x550(struct ixgbe_hw *hw)
-{
-	u32 link_reg;
-	s32 status;
-
-	switch (hw->device_id) {
-	case IXGBE_DEV_ID_X550EM_X_KR:
-	case IXGBE_DEV_ID_X550EM_A_KR:
-	case IXGBE_DEV_ID_X550EM_A_KR_L:
-		status = hw->mac.ops.read_iosf_sb_reg(hw,
-					IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
-					IXGBE_SB_IOSF_TARGET_KR_PHY, &link_reg);
-		if (status != IXGBE_SUCCESS)
-			return status;
-
-		link_reg &= ~(IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KR |
-			      IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KX);
-
-		/* Advertise FEC capability when EEE is disabled. */
-		link_reg |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_CAP_FEC;
-
-		status = hw->mac.ops.write_iosf_sb_reg(hw,
-					IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
-					IXGBE_SB_IOSF_TARGET_KR_PHY, link_reg);
-		if (status != IXGBE_SUCCESS)
-			return status;
-		break;
-	default:
-		break;
-	}
-
-	return IXGBE_SUCCESS;
-}
-
-/**
- *  ixgbe_setup_eee_X550 - Enable/disable EEE support
- *  @hw: pointer to the HW structure
- *  @enable_eee: boolean flag to enable EEE
- *
- *  Enable/disable EEE based on enable_eee flag.
- *  Auto-negotiation must be started after BASE-T EEE bits in PHY register 7.3C
- *  are modified.
- *
- **/
-s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee)
-{
-	s32 status;
-	u32 eeer;
-
-	DEBUGFUNC("ixgbe_setup_eee_X550");
-
-	eeer = IXGBE_READ_REG(hw, IXGBE_EEER);
-	/* Enable or disable EEE per flag */
-	if (enable_eee) {
-		eeer |= (IXGBE_EEER_TX_LPI_EN | IXGBE_EEER_RX_LPI_EN);
-
-		status = ixgbe_enable_eee_x550(hw);
-		if (status)
-			return status;
-	} else {
-		eeer &= ~(IXGBE_EEER_TX_LPI_EN | IXGBE_EEER_RX_LPI_EN);
-
-		status = ixgbe_disable_eee_x550(hw);
-		if (status)
-			return status;
-	}
-	IXGBE_WRITE_REG(hw, IXGBE_EEER, eeer);
-
-	return IXGBE_SUCCESS;
-}
-
-/**
  * ixgbe_set_source_address_pruning_X550 - Enable/Disbale source address pruning
  * @hw: pointer to hardware structure
  * @enable: enable or disable source address pruning
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.h b/drivers/net/ixgbe/base/ixgbe_x550.h
index 2d1876b..30ca5df 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.h
+++ b/drivers/net/ixgbe/base/ixgbe_x550.h
@@ -57,8 +57,6 @@ s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset,
 u16				*data);
 s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset,
 				    u16 data);
-s32 ixgbe_set_eee_X550(struct ixgbe_hw *hw, bool enable_eee);
-s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee);
 void ixgbe_set_source_address_pruning_X550(struct ixgbe_hw *hw, bool enable,
 					   unsigned int pool);
 void ixgbe_set_ethertype_anti_spoofing_X550(struct ixgbe_hw *hw,
-- 
2.7.4

  parent reply	other threads:[~2016-12-21  9:52 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-21  9:47 [dpdk-dev] [PATCH v2 00/30] update ixgbe shared code to version 16.11.21 Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 01/30] net/ixgbe/base: fix PHY reset check for x550em-ext Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 02/30] net/ixgbe/base: fix clearing SAN MAC address Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 03/30] net/ixgbe/base: use fast MDIO for non-10G devices Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 04/30] net/ixgbe/base: fix PHY identification for x550a Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 05/30] net/ixgbe/base: clean up X557 link status check Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 06/30] net/ixgbe/base: add driver version to firmware Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 07/30] net/ixgbe/base: store link active LED Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 08/30] net/ixgbe/base: cleanup X540 checksum calculation Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 09/30] net/ixgbe/base: enable LASI only for X552 devices Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 10/30] net/ixgbe/base: limit iXFI setup to " Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 11/30] net/ixgbe/base: fix getting PHY type for some x550 devices Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 12/30] net/ixgbe/base: fix SGMII link setup for M88 PHYs Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 13/30] net/ixgbe/base: cleanup dead EEE code Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 14/30] net/ixgbe/base: fix setting unsupported autoneg speeds Wei Dai
2016-12-21  9:47 ` [dpdk-dev] [PATCH v2 15/30] net/ixgbe/base: support FW commands to control some PHYs Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 16/30] net/ixgbe/base: use " Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 17/30] net/ixgbe/base: support busy SGMII register reads Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 18/30] net/ixgbe/base: include new speeds in VFLINK interpretation Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 19/30] net/ixgbe/base: limit 5Gb support to X550 devices Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 20/30] net/ixgbe/base: add physical layer options for FW PHY type Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 21/30] net/ixgbe/base: remove unneeded MAC type check Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 22/30] net/ixgbe/base: remove unused PHY ID Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 23/30] net/ixgbe/base: update FW PHY flow control Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 24/30] net/ixgbe/base: add EEE support for some PHYs Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 25/30] net/ixgbe/base: remove unused enum type Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 26/30] net/ixgbe/base: fix IXGBE LSWFW register Wei Dai
2016-12-21  9:48 ` Wei Dai [this message]
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 28/30] net/ixgbe/base: add write flush required by Inphi PHY Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 29/30] net/ixgbe/base: report physical layer for SGMII PHY type Wei Dai
2016-12-21  9:48 ` [dpdk-dev] [PATCH v2 30/30] net/ixgbe/base: update shared code version to 2016.11.21 Wei Dai
2016-12-21 17:20 ` [dpdk-dev] [PATCH v2 00/30] update ixgbe shared code to version 16.11.21 Ferruh Yigit
2016-12-22  2:35   ` Dai, Wei

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=1482313694-31602-28-git-send-email-wei.dai@intel.com \
    --to=wei.dai@intel.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=konstantin.ananyev@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).