DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/3] net/ixgbe/base: remove PHY access for some 1G ports
@ 2017-05-27  8:33 Wei Dai
  2017-05-27  8:33 ` [dpdk-dev] [PATCH 2/3] net/ixgbe/base: disable X550EM-x 1GBASE-T led switch support Wei Dai
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wei Dai @ 2017-05-27  8:33 UTC (permalink / raw)
  To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Wei Dai

This patch removes some some 1GBASE-T PHY access since the FW
configures the PHY. SW shall not configure or initialize link.
Accessing the PHY would require the use of MDI clause 22 which
should be avoided in high layer driver code.

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_x550.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 674dc14..dd8be75 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -459,9 +459,13 @@ STATIC s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw)
 		hw->phy.type = ixgbe_phy_x550em_kr;
 		break;
 	case IXGBE_DEV_ID_X550EM_A_10G_T:
-	case IXGBE_DEV_ID_X550EM_X_1G_T:
 	case IXGBE_DEV_ID_X550EM_X_10G_T:
 		return ixgbe_identify_phy_generic(hw);
+	case IXGBE_DEV_ID_X550EM_X_1G_T:
+		hw->phy.type = ixgbe_phy_ext_1g_t;
+		hw->phy.ops.read_reg = NULL;
+		hw->phy.ops.write_reg = NULL;
+		break;
 	case IXGBE_DEV_ID_X550EM_A_1G_T:
 	case IXGBE_DEV_ID_X550EM_A_1G_T_L:
 		hw->phy.type = ixgbe_phy_fw;
@@ -751,6 +755,11 @@ s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw)
 		phy->ops.set_phy_power = NULL;
 		phy->ops.get_firmware_version = NULL;
 		break;
+	case IXGBE_DEV_ID_X550EM_X_1G_T:
+		mac->ops.setup_fc = NULL;
+		phy->ops.identify = ixgbe_identify_phy_x550em;
+		phy->ops.set_phy_power = NULL;
+		break;
 	default:
 		phy->ops.identify = ixgbe_identify_phy_x550em;
 	}
@@ -945,6 +954,10 @@ s32 ixgbe_init_ops_X550EM_x(struct ixgbe_hw *hw)
 				      ixgbe_write_i2c_combined_generic_unlocked;
 	link->addr = IXGBE_CS4227;
 
+	if (hw->device_id == IXGBE_DEV_ID_X550EM_X_1G_T) {
+		mac->ops.setup_fc = NULL;
+		mac->ops.setup_eee = NULL;
+	}
 
 	return ret_val;
 }
@@ -1915,6 +1928,8 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)
 						ixgbe_setup_mac_link_sfp_x550em;
 		break;
 	case ixgbe_media_type_copper:
+		if (hw->device_id == IXGBE_DEV_ID_X550EM_X_1G_T)
+			break;
 		if (hw->mac.type == ixgbe_mac_X550EM_a) {
 			if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
 			    hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L) {
@@ -2380,10 +2395,6 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
 		/* set up for CS4227 usage */
 		hw->phy.phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM;
 		break;
-	case IXGBE_DEV_ID_X550EM_X_1G_T:
-		phy->ops.read_reg_mdi = ixgbe_read_phy_reg_mdi_22;
-		phy->ops.write_reg_mdi = ixgbe_write_phy_reg_mdi_22;
-		break;
 	default:
 		break;
 	}
@@ -2565,10 +2576,9 @@ s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
 	status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask);
 	if (status != IXGBE_SUCCESS) {
 		ERROR_REPORT2(IXGBE_ERROR_CAUTION,
-				"semaphore failed with %d", status);
+			"semaphore failed with %d", status);
 		return IXGBE_ERR_SWFW_SYNC;
 	}
-
 	ctrl |= IXGBE_READ_REG(hw, IXGBE_CTRL);
 	IXGBE_WRITE_REG(hw, IXGBE_CTRL, ctrl);
 	IXGBE_WRITE_FLUSH(hw);
-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 2/3] net/ixgbe/base: disable X550EM-x 1GBASE-T led switch support
  2017-05-27  8:33 [dpdk-dev] [PATCH 1/3] net/ixgbe/base: remove PHY access for some 1G ports Wei Dai
@ 2017-05-27  8:33 ` Wei Dai
  2017-05-27  8:33 ` [dpdk-dev] [PATCH 3/3] net/ixgbe/base: update version to 2017.05.16 Wei Dai
  2017-05-30 12:20 ` [dpdk-dev] [PATCH 1/3] net/ixgbe/base: remove PHY access for some 1G ports Ferruh Yigit
  2 siblings, 0 replies; 4+ messages in thread
From: Wei Dai @ 2017-05-27  8:33 UTC (permalink / raw)
  To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Wei Dai

This patch disables X550EM_X 1Gbase-t led_[on|off] support since
the LEDs are wired to the PHY and the driver can not access the
PHY. led_[on|off] supportis disabled by setting the function
pointer to NULL. init_led_link_act is also set to NULL.

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c | 3 ++-
 drivers/net/ixgbe/base/ixgbe_x550.c   | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index 4dabb43..7f85713 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -504,7 +504,8 @@ s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw)
 	}
 
 	/* Initialize the LED link active for LED blink support */
-	hw->mac.ops.init_led_link_act(hw);
+	if (hw->mac.ops.init_led_link_act)
+		hw->mac.ops.init_led_link_act(hw);
 
 	if (status != IXGBE_SUCCESS)
 		DEBUGOUT1("Failed to initialize HW, STATUS = %d\n", status);
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index dd8be75..9862391 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -86,6 +86,10 @@ s32 ixgbe_init_ops_X550(struct ixgbe_hw *hw)
 	/* Manageability interface */
 	mac->ops.set_fw_drv_ver = ixgbe_set_fw_drv_ver_x550;
 	switch (hw->device_id) {
+	case IXGBE_DEV_ID_X550EM_X_1G_T:
+		hw->mac.ops.led_on = NULL;
+		hw->mac.ops.led_off = NULL;
+		break;
 	case IXGBE_DEV_ID_X550EM_X_10G_T:
 	case IXGBE_DEV_ID_X550EM_A_10G_T:
 		hw->mac.ops.led_on = ixgbe_led_on_t_X550em;
@@ -957,6 +961,7 @@ s32 ixgbe_init_ops_X550EM_x(struct ixgbe_hw *hw)
 	if (hw->device_id == IXGBE_DEV_ID_X550EM_X_1G_T) {
 		mac->ops.setup_fc = NULL;
 		mac->ops.setup_eee = NULL;
+		mac->ops.init_led_link_act = NULL;
 	}
 
 	return ret_val;
@@ -2425,6 +2430,7 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
 	case ixgbe_phy_ext_1g_t:
 		/* link is managed by FW */
 		phy->ops.setup_link = NULL;
+		phy->ops.reset = NULL;
 		break;
 	case ixgbe_phy_x550em_xfi:
 		/* link is managed by HW */
-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 3/3] net/ixgbe/base: update version to 2017.05.16
  2017-05-27  8:33 [dpdk-dev] [PATCH 1/3] net/ixgbe/base: remove PHY access for some 1G ports Wei Dai
  2017-05-27  8:33 ` [dpdk-dev] [PATCH 2/3] net/ixgbe/base: disable X550EM-x 1GBASE-T led switch support Wei Dai
@ 2017-05-27  8:33 ` Wei Dai
  2017-05-30 12:20 ` [dpdk-dev] [PATCH 1/3] net/ixgbe/base: remove PHY access for some 1G ports Ferruh Yigit
  2 siblings, 0 replies; 4+ messages in thread
From: Wei Dai @ 2017-05-27  8:33 UTC (permalink / raw)
  To: wenzhuo.lu, konstantin.ananyev; +Cc: dev, Wei Dai

* Remove PHY access for some 1G ports
* Disable X550EM-x 1GBASE-T led switch support

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/README b/drivers/net/ixgbe/base/README
index a61617b..8c833b4 100644
--- a/drivers/net/ixgbe/base/README
+++ b/drivers/net/ixgbe/base/README
@@ -34,7 +34,7 @@ Intel® IXGBE driver
 ===================
 
 This directory contains source code of FreeBSD ixgbe driver of version
-cid-10g-shared-code.2017.03.29 released by the team which develop
+cid-10g-shared-code.2017.05.16 released by the team which develop
 basic drivers for any ixgbe NIC. The sub-directory of base/
 contains the original source package.
 This driver is valid for the product(s) listed below
-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/3] net/ixgbe/base: remove PHY access for some 1G ports
  2017-05-27  8:33 [dpdk-dev] [PATCH 1/3] net/ixgbe/base: remove PHY access for some 1G ports Wei Dai
  2017-05-27  8:33 ` [dpdk-dev] [PATCH 2/3] net/ixgbe/base: disable X550EM-x 1GBASE-T led switch support Wei Dai
  2017-05-27  8:33 ` [dpdk-dev] [PATCH 3/3] net/ixgbe/base: update version to 2017.05.16 Wei Dai
@ 2017-05-30 12:20 ` Ferruh Yigit
  2 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-05-30 12:20 UTC (permalink / raw)
  To: Wei Dai, wenzhuo.lu, konstantin.ananyev; +Cc: dev

On 5/27/2017 9:33 AM, Wei Dai wrote:
> This patch removes some some 1GBASE-T PHY access since the FW
> configures the PHY. SW shall not configure or initialize link.
> Accessing the PHY would require the use of MDI clause 22 which
> should be avoided in high layer driver code.
> 
> Signed-off-by: Wei Dai <wei.dai@intel.com>

Series applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-30 12:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27  8:33 [dpdk-dev] [PATCH 1/3] net/ixgbe/base: remove PHY access for some 1G ports Wei Dai
2017-05-27  8:33 ` [dpdk-dev] [PATCH 2/3] net/ixgbe/base: disable X550EM-x 1GBASE-T led switch support Wei Dai
2017-05-27  8:33 ` [dpdk-dev] [PATCH 3/3] net/ixgbe/base: update version to 2017.05.16 Wei Dai
2017-05-30 12:20 ` [dpdk-dev] [PATCH 1/3] net/ixgbe/base: remove PHY access for some 1G ports Ferruh Yigit

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).