All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] update ixgbe base driver to version 2017-03-29
@ 2017-04-18  6:56 Wei Dai
  2017-04-18  6:57 ` [PATCH 1/4] net/ixgbe/base: acquire PHY semaphore before device reset Wei Dai
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Wei Dai @ 2017-04-18  6:56 UTC (permalink / raw)
  To: helin.zhang, konstantin.ananyev, wenzhuo.lu; +Cc: dev, Wei Dai

This patch set has following 4 patches.
No any new device id is added.

  net/ixgbe/base: acquire PHY semaphore before device reset
  net/ixgbe/base: add support for 2.5G KX physical layer
  net/ixgbe/base: add MAC X550em/X557 LED on/off support
  net/ixgbe/base: update base driver version to 2017.03.29

 drivers/net/ixgbe/base/README        |  2 +-
 drivers/net/ixgbe/base/ixgbe_82598.c |  4 ++--
 drivers/net/ixgbe/base/ixgbe_82598.h |  2 +-
 drivers/net/ixgbe/base/ixgbe_82599.c |  4 ++--
 drivers/net/ixgbe/base/ixgbe_82599.h |  2 +-
 drivers/net/ixgbe/base/ixgbe_api.c   |  2 +-
 drivers/net/ixgbe/base/ixgbe_api.h   |  2 +-
 drivers/net/ixgbe/base/ixgbe_phy.c   |  4 ++--
 drivers/net/ixgbe/base/ixgbe_phy.h   |  2 +-
 drivers/net/ixgbe/base/ixgbe_type.h  | 37 ++++++++++++++++++------------------
 drivers/net/ixgbe/base/ixgbe_x540.c  | 12 ++++++++++--
 drivers/net/ixgbe/base/ixgbe_x540.h  |  2 +-
 drivers/net/ixgbe/base/ixgbe_x550.c  | 33 ++++++++++++++++++++++++++++----
 drivers/net/ixgbe/base/ixgbe_x550.h  |  2 +-
 14 files changed, 72 insertions(+), 38 deletions(-)

-- 
2.7.4

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

* [PATCH 1/4] net/ixgbe/base: acquire PHY semaphore before device reset
  2017-04-18  6:56 [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Wei Dai
@ 2017-04-18  6:57 ` Wei Dai
  2017-04-18  6:57 ` [PATCH 2/4] net/ixgbe/base: add support for 2.5G KX physical layer Wei Dai
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Wei Dai @ 2017-04-18  6:57 UTC (permalink / raw)
  To: helin.zhang, konstantin.ananyev, wenzhuo.lu; +Cc: dev, Wei Dai

A recent firmware change fixed an issue to acquire the PHY semaphore
before accessing PHY registers. This led to a case where SW can issue
a device reset clearing the MDIO registers. This patch makes SW acquire
the PHY semaphore before issuing a device reset.

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

diff --git a/drivers/net/ixgbe/base/ixgbe_x540.c b/drivers/net/ixgbe/base/ixgbe_x540.c
index 499b1fa..f624d55 100644
--- a/drivers/net/ixgbe/base/ixgbe_x540.c
+++ b/drivers/net/ixgbe/base/ixgbe_x540.c
@@ -208,6 +208,7 @@ s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw)
 {
 	s32 status;
 	u32 ctrl, i;
+	u32 swfw_mask = hw->phy.phy_semaphore_mask;
 
 	DEBUGFUNC("ixgbe_reset_hw_X540");
 
@@ -220,10 +221,17 @@ s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw)
 	ixgbe_clear_tx_pending(hw);
 
 mac_reset_top:
+	status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask);
+	if (status != IXGBE_SUCCESS) {
+		ERROR_REPORT2(IXGBE_ERROR_CAUTION,
+			"semaphore failed with %d", status);
+		return IXGBE_ERR_SWFW_SYNC;
+	}
 	ctrl = IXGBE_CTRL_RST;
 	ctrl |= IXGBE_READ_REG(hw, IXGBE_CTRL);
 	IXGBE_WRITE_REG(hw, IXGBE_CTRL, ctrl);
 	IXGBE_WRITE_FLUSH(hw);
+	hw->mac.ops.release_swfw_sync(hw, swfw_mask);
 
 	/* Poll for reset bit to self-clear indicating reset is complete */
 	for (i = 0; i < 10; i++) {
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 3049865..a48155c 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -2497,6 +2497,7 @@ s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
 	u32 ctrl = 0;
 	u32 i;
 	bool link_up = false;
+	u32 swfw_mask = hw->phy.phy_semaphore_mask;
 
 	DEBUGFUNC("ixgbe_reset_hw_X550em");
 
@@ -2561,9 +2562,17 @@ s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
 			ctrl = IXGBE_CTRL_RST;
 	}
 
+	status = hw->mac.ops.acquire_swfw_sync(hw, swfw_mask);
+	if (status != IXGBE_SUCCESS) {
+		ERROR_REPORT2(IXGBE_ERROR_CAUTION,
+				"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);
+	hw->mac.ops.release_swfw_sync(hw, swfw_mask);
 
 	/* Poll for reset bit to self-clear meaning reset is complete */
 	for (i = 0; i < 10; i++) {
-- 
2.7.4

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

* [PATCH 2/4] net/ixgbe/base: add support for 2.5G KX physical layer
  2017-04-18  6:56 [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Wei Dai
  2017-04-18  6:57 ` [PATCH 1/4] net/ixgbe/base: acquire PHY semaphore before device reset Wei Dai
@ 2017-04-18  6:57 ` Wei Dai
  2017-04-18  6:57 ` [PATCH 3/4] net/ixgbe/base: add MAC X550em/X557 LED on/off support Wei Dai
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Wei Dai @ 2017-04-18  6:57 UTC (permalink / raw)
  To: helin.zhang, konstantin.ananyev, wenzhuo.lu; +Cc: dev, Wei Dai

Add another define for the 2.5G KX physical layer. This requires all
variables and support functions that deal with "physical_layer" to be
bumped to u64 as this is the 33rd define.

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_82598.c |  4 ++--
 drivers/net/ixgbe/base/ixgbe_82598.h |  2 +-
 drivers/net/ixgbe/base/ixgbe_82599.c |  4 ++--
 drivers/net/ixgbe/base/ixgbe_82599.h |  2 +-
 drivers/net/ixgbe/base/ixgbe_api.c   |  2 +-
 drivers/net/ixgbe/base/ixgbe_api.h   |  2 +-
 drivers/net/ixgbe/base/ixgbe_phy.c   |  4 ++--
 drivers/net/ixgbe/base/ixgbe_phy.h   |  2 +-
 drivers/net/ixgbe/base/ixgbe_type.h  | 37 ++++++++++++++++++------------------
 drivers/net/ixgbe/base/ixgbe_x540.c  |  4 ++--
 drivers/net/ixgbe/base/ixgbe_x540.h  |  2 +-
 drivers/net/ixgbe/base/ixgbe_x550.c  | 18 ++++++++++++++++--
 drivers/net/ixgbe/base/ixgbe_x550.h  |  2 +-
 13 files changed, 50 insertions(+), 35 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_82598.c b/drivers/net/ixgbe/base/ixgbe_82598.c
index 724dcbb..d64abb2 100644
--- a/drivers/net/ixgbe/base/ixgbe_82598.c
+++ b/drivers/net/ixgbe/base/ixgbe_82598.c
@@ -1222,9 +1222,9 @@ STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset,
  *
  *  Determines physical layer capabilities of the current configuration.
  **/
-u32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
+u64 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
 {
-	u32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
+	u64 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
 	u32 autoc = IXGBE_READ_REG(hw, IXGBE_AUTOC);
 	u32 pma_pmd_10g = autoc & IXGBE_AUTOC_10G_PMA_PMD_MASK;
 	u32 pma_pmd_1g = autoc & IXGBE_AUTOC_1G_PMA_PMD_MASK;
diff --git a/drivers/net/ixgbe/base/ixgbe_82598.h b/drivers/net/ixgbe/base/ixgbe_82598.h
index 0326e70..20aab9f 100644
--- a/drivers/net/ixgbe/base/ixgbe_82598.h
+++ b/drivers/net/ixgbe/base/ixgbe_82598.h
@@ -45,7 +45,7 @@ s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val);
 s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val);
 s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset,
 				u8 *eeprom_data);
-u32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw);
+u64 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw);
 s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw);
 void ixgbe_set_lan_id_multi_port_pcie_82598(struct ixgbe_hw *hw);
 void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw);
diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c b/drivers/net/ixgbe/base/ixgbe_82599.c
index 832242e..d9d11a8 100644
--- a/drivers/net/ixgbe/base/ixgbe_82599.c
+++ b/drivers/net/ixgbe/base/ixgbe_82599.c
@@ -2169,9 +2169,9 @@ s32 ixgbe_identify_phy_82599(struct ixgbe_hw *hw)
  *
  *  Determines physical layer capabilities of the current configuration.
  **/
-u32 ixgbe_get_supported_physical_layer_82599(struct ixgbe_hw *hw)
+u64 ixgbe_get_supported_physical_layer_82599(struct ixgbe_hw *hw)
 {
-	u32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
+	u64 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
 	u32 autoc = IXGBE_READ_REG(hw, IXGBE_AUTOC);
 	u32 autoc2 = IXGBE_READ_REG(hw, IXGBE_AUTOC2);
 	u32 pma_pmd_10g_serial = autoc2 & IXGBE_AUTOC2_10G_SERIAL_PMA_PMD_MASK;
diff --git a/drivers/net/ixgbe/base/ixgbe_82599.h b/drivers/net/ixgbe/base/ixgbe_82599.h
index c034d3d..d555dbc 100644
--- a/drivers/net/ixgbe/base/ixgbe_82599.h
+++ b/drivers/net/ixgbe/base/ixgbe_82599.h
@@ -57,7 +57,7 @@ s32 ixgbe_write_analog_reg8_82599(struct ixgbe_hw *hw, u32 reg, u8 val);
 s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw);
 s32 ixgbe_identify_phy_82599(struct ixgbe_hw *hw);
 s32 ixgbe_init_phy_ops_82599(struct ixgbe_hw *hw);
-u32 ixgbe_get_supported_physical_layer_82599(struct ixgbe_hw *hw);
+u64 ixgbe_get_supported_physical_layer_82599(struct ixgbe_hw *hw);
 s32 ixgbe_enable_rx_dma_82599(struct ixgbe_hw *hw, u32 regval);
 s32 prot_autoc_read_82599(struct ixgbe_hw *hw, bool *locked, u32 *reg_val);
 s32 prot_autoc_write_82599(struct ixgbe_hw *hw, u32 reg_val, bool locked);
diff --git a/drivers/net/ixgbe/base/ixgbe_api.c b/drivers/net/ixgbe/base/ixgbe_api.c
index 270a97d..4117fb0 100644
--- a/drivers/net/ixgbe/base/ixgbe_api.c
+++ b/drivers/net/ixgbe/base/ixgbe_api.c
@@ -1579,7 +1579,7 @@ s32 ixgbe_read_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data)
  *
  *  Determines physical layer capabilities of the current configuration.
  **/
-u32 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw)
+u64 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw)
 {
 	return ixgbe_call_func(hw, hw->mac.ops.get_supported_physical_layer,
 			       (hw), IXGBE_PHYSICAL_LAYER_UNKNOWN);
diff --git a/drivers/net/ixgbe/base/ixgbe_api.h b/drivers/net/ixgbe/base/ixgbe_api.h
index af85d4e..2f532aa 100644
--- a/drivers/net/ixgbe/base/ixgbe_api.h
+++ b/drivers/net/ixgbe/base/ixgbe_api.h
@@ -143,7 +143,7 @@ s32 ixgbe_read_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 *val);
 s32 ixgbe_write_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 val);
 s32 ixgbe_init_uta_tables(struct ixgbe_hw *hw);
 s32 ixgbe_read_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data);
-u32 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw);
+u64 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw);
 s32 ixgbe_enable_rx_dma(struct ixgbe_hw *hw, u32 regval);
 s32 ixgbe_disable_sec_rx_path(struct ixgbe_hw *hw);
 s32 ixgbe_enable_sec_rx_path(struct ixgbe_hw *hw);
diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index f44a11e..62c3080 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -1575,9 +1575,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
  *
  *  Determines physical layer capabilities of the current SFP.
  */
-s32 ixgbe_get_supported_phy_sfp_layer_generic(struct ixgbe_hw *hw)
+u64 ixgbe_get_supported_phy_sfp_layer_generic(struct ixgbe_hw *hw)
 {
-	u32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
+	u64 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
 	u8 comp_codes_10g = 0;
 	u8 comp_codes_1g = 0;
 
diff --git a/drivers/net/ixgbe/base/ixgbe_phy.h b/drivers/net/ixgbe/base/ixgbe_phy.h
index 820d471..cf8cadd 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.h
+++ b/drivers/net/ixgbe/base/ixgbe_phy.h
@@ -192,7 +192,7 @@ s32 ixgbe_reset_phy_nl(struct ixgbe_hw *hw);
 s32 ixgbe_set_copper_phy_power(struct ixgbe_hw *hw, bool on);
 s32 ixgbe_identify_module_generic(struct ixgbe_hw *hw);
 s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw);
-s32 ixgbe_get_supported_phy_sfp_layer_generic(struct ixgbe_hw *hw);
+u64 ixgbe_get_supported_phy_sfp_layer_generic(struct ixgbe_hw *hw);
 s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw);
 s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
 					u16 *list_offset,
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 6acd966..bda8558 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -3410,24 +3410,25 @@ typedef u32 ixgbe_link_speed;
 					 IXGBE_LINK_SPEED_10GB_FULL)
 
 /* Physical layer type */
-typedef u32 ixgbe_physical_layer;
+typedef u64 ixgbe_physical_layer;
 #define IXGBE_PHYSICAL_LAYER_UNKNOWN		0
-#define IXGBE_PHYSICAL_LAYER_10GBASE_T		0x0001
-#define IXGBE_PHYSICAL_LAYER_1000BASE_T		0x0002
-#define IXGBE_PHYSICAL_LAYER_100BASE_TX		0x0004
-#define IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU	0x0008
-#define IXGBE_PHYSICAL_LAYER_10GBASE_LR		0x0010
-#define IXGBE_PHYSICAL_LAYER_10GBASE_LRM	0x0020
-#define IXGBE_PHYSICAL_LAYER_10GBASE_SR		0x0040
-#define IXGBE_PHYSICAL_LAYER_10GBASE_KX4	0x0080
-#define IXGBE_PHYSICAL_LAYER_10GBASE_CX4	0x0100
-#define IXGBE_PHYSICAL_LAYER_1000BASE_KX	0x0200
-#define IXGBE_PHYSICAL_LAYER_1000BASE_BX	0x0400
-#define IXGBE_PHYSICAL_LAYER_10GBASE_KR		0x0800
-#define IXGBE_PHYSICAL_LAYER_10GBASE_XAUI	0x1000
-#define IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA	0x2000
-#define IXGBE_PHYSICAL_LAYER_1000BASE_SX	0x4000
-#define IXGBE_PHYSICAL_LAYER_10BASE_T		0x8000
+#define IXGBE_PHYSICAL_LAYER_10GBASE_T		0x00001
+#define IXGBE_PHYSICAL_LAYER_1000BASE_T		0x00002
+#define IXGBE_PHYSICAL_LAYER_100BASE_TX		0x00004
+#define IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU	0x00008
+#define IXGBE_PHYSICAL_LAYER_10GBASE_LR		0x00010
+#define IXGBE_PHYSICAL_LAYER_10GBASE_LRM	0x00020
+#define IXGBE_PHYSICAL_LAYER_10GBASE_SR		0x00040
+#define IXGBE_PHYSICAL_LAYER_10GBASE_KX4	0x00080
+#define IXGBE_PHYSICAL_LAYER_10GBASE_CX4	0x00100
+#define IXGBE_PHYSICAL_LAYER_1000BASE_KX	0x00200
+#define IXGBE_PHYSICAL_LAYER_1000BASE_BX	0x00400
+#define IXGBE_PHYSICAL_LAYER_10GBASE_KR		0x00800
+#define IXGBE_PHYSICAL_LAYER_10GBASE_XAUI	0x01000
+#define IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA	0x02000
+#define IXGBE_PHYSICAL_LAYER_1000BASE_SX	0x04000
+#define IXGBE_PHYSICAL_LAYER_10BASE_T		0x08000
+#define IXGBE_PHYSICAL_LAYER_2500BASE_KX	0x10000
 
 /* Flow Control Data Sheet defined values
  * Calculation and defines taken from 802.1bb Annex O
@@ -3906,7 +3907,7 @@ struct ixgbe_mac_operations {
 	s32 (*clear_hw_cntrs)(struct ixgbe_hw *);
 	void (*enable_relaxed_ordering)(struct ixgbe_hw *);
 	enum ixgbe_media_type (*get_media_type)(struct ixgbe_hw *);
-	u32 (*get_supported_physical_layer)(struct ixgbe_hw *);
+	u64 (*get_supported_physical_layer)(struct ixgbe_hw *);
 	s32 (*get_mac_addr)(struct ixgbe_hw *, u8 *);
 	s32 (*get_san_mac_addr)(struct ixgbe_hw *, u8 *);
 	s32 (*set_san_mac_addr)(struct ixgbe_hw *, u8 *);
diff --git a/drivers/net/ixgbe/base/ixgbe_x540.c b/drivers/net/ixgbe/base/ixgbe_x540.c
index f624d55..0e51813 100644
--- a/drivers/net/ixgbe/base/ixgbe_x540.c
+++ b/drivers/net/ixgbe/base/ixgbe_x540.c
@@ -329,9 +329,9 @@ s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw)
  *
  *  Determines physical layer capabilities of the current configuration.
  **/
-u32 ixgbe_get_supported_physical_layer_X540(struct ixgbe_hw *hw)
+u64 ixgbe_get_supported_physical_layer_X540(struct ixgbe_hw *hw)
 {
-	u32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
+	u64 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
 	u16 ext_ability = 0;
 
 	DEBUGFUNC("ixgbe_get_supported_physical_layer_X540");
diff --git a/drivers/net/ixgbe/base/ixgbe_x540.h b/drivers/net/ixgbe/base/ixgbe_x540.h
index e4baf6f..8a19ae2 100644
--- a/drivers/net/ixgbe/base/ixgbe_x540.h
+++ b/drivers/net/ixgbe/base/ixgbe_x540.h
@@ -43,7 +43,7 @@ s32 ixgbe_setup_mac_link_X540(struct ixgbe_hw *hw, ixgbe_link_speed speed,
 			      bool link_up_wait_to_complete);
 s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw);
 s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw);
-u32 ixgbe_get_supported_physical_layer_X540(struct ixgbe_hw *hw);
+u64 ixgbe_get_supported_physical_layer_X540(struct ixgbe_hw *hw);
 
 s32 ixgbe_init_eeprom_params_X540(struct ixgbe_hw *hw);
 s32 ixgbe_read_eerd_X540(struct ixgbe_hw *hw, u16 offset, u16 *data);
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index a48155c..32786f8 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -3673,9 +3673,9 @@ s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw)
  *
  *  Determines physical layer capabilities of the current configuration.
  **/
-u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw)
+u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw)
 {
-	u32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
+	u64 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
 	u16 ext_ability = 0;
 
 	DEBUGFUNC("ixgbe_get_supported_physical_layer_X550em");
@@ -3684,6 +3684,20 @@ u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw)
 
 	switch (hw->phy.type) {
 	case ixgbe_phy_x550em_kr:
+		if (hw->mac.type == ixgbe_mac_X550EM_a) {
+			if (hw->phy.nw_mng_if_sel &
+			    IXGBE_NW_MNG_IF_SEL_PHY_SPEED_2_5G) {
+				physical_layer =
+					IXGBE_PHYSICAL_LAYER_2500BASE_KX;
+				break;
+			} else if (hw->device_id ==
+				   IXGBE_DEV_ID_X550EM_A_KR_L) {
+				physical_layer =
+					IXGBE_PHYSICAL_LAYER_1000BASE_KX;
+				break;
+			}
+		}
+		/* fall through */
 	case ixgbe_phy_x550em_xfi:
 		physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_KR |
 				 IXGBE_PHYSICAL_LAYER_1000BASE_KX;
diff --git a/drivers/net/ixgbe/base/ixgbe_x550.h b/drivers/net/ixgbe/base/ixgbe_x550.h
index 30ca5df..6d18874 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.h
+++ b/drivers/net/ixgbe/base/ixgbe_x550.h
@@ -88,7 +88,7 @@ s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw);
 s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw);
 s32 ixgbe_setup_internal_phy_t_x550em(struct ixgbe_hw *hw);
 s32 ixgbe_setup_phy_loopback_x550em(struct ixgbe_hw *hw);
-u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw);
+u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw);
 void ixgbe_disable_rx_x550(struct ixgbe_hw *hw);
 s32 ixgbe_get_lcd_t_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *lcd_speed);
 s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw);
-- 
2.7.4

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

* [PATCH 3/4] net/ixgbe/base: add MAC X550em/X557 LED on/off support
  2017-04-18  6:56 [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Wei Dai
  2017-04-18  6:57 ` [PATCH 1/4] net/ixgbe/base: acquire PHY semaphore before device reset Wei Dai
  2017-04-18  6:57 ` [PATCH 2/4] net/ixgbe/base: add support for 2.5G KX physical layer Wei Dai
@ 2017-04-18  6:57 ` Wei Dai
  2017-04-18  6:57 ` [PATCH 4/4] net/ixgbe/base: update base driver version to 2017.03.29 Wei Dai
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Wei Dai @ 2017-04-18  6:57 UTC (permalink / raw)
  To: helin.zhang, konstantin.ananyev, wenzhuo.lu; +Cc: dev, Wei Dai

This patch updates ixgbe_led_[on|off]_t_X550em for MAC or PHY connected
LEDs. To support both MAC or PHY connected LEDs, both MAC and PHY led
control registers are configured.

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

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 32786f8..674dc14 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -4610,7 +4610,8 @@ s32 ixgbe_led_on_t_X550em(struct ixgbe_hw *hw, u32 led_idx)
 	ixgbe_write_phy_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx,
 			    IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, phy_data);
 
-	return IXGBE_SUCCESS;
+	/* Some designs have the LEDs wired to the MAC */
+	return ixgbe_led_on_generic(hw, led_idx);
 }
 
 /**
@@ -4634,7 +4635,8 @@ s32 ixgbe_led_off_t_X550em(struct ixgbe_hw *hw, u32 led_idx)
 	ixgbe_write_phy_reg(hw, IXGBE_X557_LED_PROVISIONING + led_idx,
 			    IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE, phy_data);
 
-	return IXGBE_SUCCESS;
+	/* Some designs have the LEDs wired to the MAC */
+	return ixgbe_led_off_generic(hw, led_idx);
 }
 
 /**
-- 
2.7.4

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

* [PATCH 4/4] net/ixgbe/base: update base driver version to 2017.03.29
  2017-04-18  6:56 [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Wei Dai
                   ` (2 preceding siblings ...)
  2017-04-18  6:57 ` [PATCH 3/4] net/ixgbe/base: add MAC X550em/X557 LED on/off support Wei Dai
@ 2017-04-18  6:57 ` Wei Dai
  2017-04-19 13:22 ` [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Ferruh Yigit
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Wei Dai @ 2017-04-18  6:57 UTC (permalink / raw)
  To: helin.zhang, konstantin.ananyev, wenzhuo.lu; +Cc: dev, Wei Dai

* Acquire PHY semaphore before device reset
* Add support for 2.5G KX physical layer
* Add MAC X550em/X557 LED on|off 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 49bb27c..a61617b 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.02.27 released by the team which develop
+cid-10g-shared-code.2017.03.29 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 related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] update ixgbe base driver to version 2017-03-29
  2017-04-18  6:56 [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Wei Dai
                   ` (3 preceding siblings ...)
  2017-04-18  6:57 ` [PATCH 4/4] net/ixgbe/base: update base driver version to 2017.03.29 Wei Dai
@ 2017-04-19 13:22 ` Ferruh Yigit
  2017-04-20 13:29   ` Dai, Wei
  2017-04-21  3:50 ` Peng, Yuan
  2017-04-21 11:35 ` Ferruh Yigit
  6 siblings, 1 reply; 9+ messages in thread
From: Ferruh Yigit @ 2017-04-19 13:22 UTC (permalink / raw)
  To: Wei Dai; +Cc: helin.zhang, konstantin.ananyev, wenzhuo.lu, dev

On 4/18/2017 7:56 AM, Wei Dai wrote:
> This patch set has following 4 patches.
> No any new device id is added.
> 
>   net/ixgbe/base: acquire PHY semaphore before device reset
>   net/ixgbe/base: add support for 2.5G KX physical layer
>   net/ixgbe/base: add MAC X550em/X557 LED on/off support
>   net/ixgbe/base: update base driver version to 2017.03.29

Hi Wei,

This base code update received very close to RC2. I am postponing to
next release.

If this set has a critical fix for release, please shout for RC3 inclusion.

Thanks,
ferruh

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

* Re: [PATCH 0/4] update ixgbe base driver to version 2017-03-29
  2017-04-19 13:22 ` [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Ferruh Yigit
@ 2017-04-20 13:29   ` Dai, Wei
  0 siblings, 0 replies; 9+ messages in thread
From: Dai, Wei @ 2017-04-20 13:29 UTC (permalink / raw)
  To: Yigit, Ferruh; +Cc: Zhang, Helin, Ananyev, Konstantin, Lu, Wenzhuo, dev

Hi, Ferruh

The first patch is to align a fix in firmware.
The second is to fix the miss of support of 2.5G PHY which is also needed by some customers.
The third is to fix LED support on MAC X550em/X557.

We have just verified them with fixed firmware.
So if it is accepted, some customers can get these support.

Thanks & Best Regards
-Wei 

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Wednesday, April 19, 2017 9:22 PM
> To: Dai, Wei <wei.dai@intel.com>
> Cc: Zhang, Helin <helin.zhang@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>;
> dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 0/4] update ixgbe base driver to version
> 2017-03-29
> 
> On 4/18/2017 7:56 AM, Wei Dai wrote:
> > This patch set has following 4 patches.
> > No any new device id is added.
> >
> >   net/ixgbe/base: acquire PHY semaphore before device reset
> >   net/ixgbe/base: add support for 2.5G KX physical layer
> >   net/ixgbe/base: add MAC X550em/X557 LED on/off support
> >   net/ixgbe/base: update base driver version to 2017.03.29
> 
> Hi Wei,
> 
> This base code update received very close to RC2. I am postponing to next
> release.
> 
> If this set has a critical fix for release, please shout for RC3 inclusion.
> 
> Thanks,
> ferruh

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

* Re: [PATCH 0/4] update ixgbe base driver to version 2017-03-29
  2017-04-18  6:56 [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Wei Dai
                   ` (4 preceding siblings ...)
  2017-04-19 13:22 ` [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Ferruh Yigit
@ 2017-04-21  3:50 ` Peng, Yuan
  2017-04-21 11:35 ` Ferruh Yigit
  6 siblings, 0 replies; 9+ messages in thread
From: Peng, Yuan @ 2017-04-21  3:50 UTC (permalink / raw)
  To: Dai, Wei, Zhang, Helin, Ananyev, Konstantin, Lu, Wenzhuo; +Cc: dev, Dai, Wei

Tested-by: Peng Yuan <yuan.peng@intel.com>

- Tested Branch: dpdk v17.02
- Tested Commit: b9ebab26d98f61bc407572623c4bee4390a8b432
- OS: 4.4.26-yocto-standard
- IFWI: HAVLCRB1.X64.0014.D76.1703170116
- NIC: Intel Corporation Device [8086:15ce] (rev 10)
 driver: ixgbe-5.0.7
 firmware-version: 0x800006f8/ 0x80000714
- Default x86_64-native-linuxapp-gcc configuration
- Prerequisites:
- Total 69 cases, 69 passed, 0 failed

You can check the test report from attachment.

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Dai
Sent: Tuesday, April 18, 2017 2:57 PM
To: Zhang, Helin <helin.zhang@intel.com>; Ananyev, Konstantin <konstantin.ananyev@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>
Cc: dev@dpdk.org; Dai, Wei <wei.dai@intel.com>
Subject: [dpdk-dev] [PATCH 0/4] update ixgbe base driver to version 2017-03-29

This patch set has following 4 patches.
No any new device id is added.

  net/ixgbe/base: acquire PHY semaphore before device reset
  net/ixgbe/base: add support for 2.5G KX physical layer
  net/ixgbe/base: add MAC X550em/X557 LED on/off support
  net/ixgbe/base: update base driver version to 2017.03.29

 drivers/net/ixgbe/base/README        |  2 +-
 drivers/net/ixgbe/base/ixgbe_82598.c |  4 ++--  drivers/net/ixgbe/base/ixgbe_82598.h |  2 +-  drivers/net/ixgbe/base/ixgbe_82599.c |  4 ++--  drivers/net/ixgbe/base/ixgbe_82599.h |  2 +-
 drivers/net/ixgbe/base/ixgbe_api.c   |  2 +-
 drivers/net/ixgbe/base/ixgbe_api.h   |  2 +-
 drivers/net/ixgbe/base/ixgbe_phy.c   |  4 ++--
 drivers/net/ixgbe/base/ixgbe_phy.h   |  2 +-
 drivers/net/ixgbe/base/ixgbe_type.h  | 37 ++++++++++++++++++------------------
 drivers/net/ixgbe/base/ixgbe_x540.c  | 12 ++++++++++--  drivers/net/ixgbe/base/ixgbe_x540.h  |  2 +-  drivers/net/ixgbe/base/ixgbe_x550.c  | 33 ++++++++++++++++++++++++++++----  drivers/net/ixgbe/base/ixgbe_x550.h  |  2 +-
 14 files changed, 72 insertions(+), 38 deletions(-)

--
2.7.4

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

* Re: [PATCH 0/4] update ixgbe base driver to version 2017-03-29
  2017-04-18  6:56 [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Wei Dai
                   ` (5 preceding siblings ...)
  2017-04-21  3:50 ` Peng, Yuan
@ 2017-04-21 11:35 ` Ferruh Yigit
  6 siblings, 0 replies; 9+ messages in thread
From: Ferruh Yigit @ 2017-04-21 11:35 UTC (permalink / raw)
  To: Wei Dai, helin.zhang, konstantin.ananyev, wenzhuo.lu; +Cc: dev

On 4/18/2017 7:56 AM, Wei Dai wrote:
> This patch set has following 4 patches.
> No any new device id is added.
> 
>   net/ixgbe/base: acquire PHY semaphore before device reset
>   net/ixgbe/base: add support for 2.5G KX physical layer
>   net/ixgbe/base: add MAC X550em/X557 LED on/off support
>   net/ixgbe/base: update base driver version to 2017.03.29

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

(Please try to cover PMD tests done on RC1 with latest next-net)

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

end of thread, other threads:[~2017-04-21 11:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18  6:56 [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Wei Dai
2017-04-18  6:57 ` [PATCH 1/4] net/ixgbe/base: acquire PHY semaphore before device reset Wei Dai
2017-04-18  6:57 ` [PATCH 2/4] net/ixgbe/base: add support for 2.5G KX physical layer Wei Dai
2017-04-18  6:57 ` [PATCH 3/4] net/ixgbe/base: add MAC X550em/X557 LED on/off support Wei Dai
2017-04-18  6:57 ` [PATCH 4/4] net/ixgbe/base: update base driver version to 2017.03.29 Wei Dai
2017-04-19 13:22 ` [PATCH 0/4] update ixgbe base driver to version 2017-03-29 Ferruh Yigit
2017-04-20 13:29   ` Dai, Wei
2017-04-21  3:50 ` Peng, Yuan
2017-04-21 11:35 ` Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.