patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v2 03/20] net/ixgbe/base: fix host interface shadow RAM read
       [not found] ` <20200702031329.4495-1-guinanx.sun@intel.com>
@ 2020-07-02  3:13   ` Guinan Sun
  2020-07-02  3:13   ` [dpdk-stable] [PATCH v2 05/20] net/ixgbe/base: fix x550em 10G NIC link status report Guinan Sun
       [not found]   ` <20200709080046.65879-1-guinanx.sun@intel.com>
  2 siblings, 0 replies; 4+ messages in thread
From: Guinan Sun @ 2020-07-02  3:13 UTC (permalink / raw)
  To: dev; +Cc: Jeff Guo, Zhao1 Wei, Guinan Sun, stable, Mateusz Kowalski

Host interface Shadow RAM Read (0x31) command response
buffer length should be stored in two bytes, instead of one byte.
This patch fixes it.

Fixes: e6102361b1d4 ("net/ixgbe/base: use 2 bytes for flash read command")
Cc: stable@dpdk.org

Signed-off-by: Mateusz Kowalski <mateusz.kowalski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c |  2 +-
 drivers/net/ixgbe/base/ixgbe_type.h   | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index 36c003844..9e3b71e38 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4656,7 +4656,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	 * Read Flash command requires reading buffer length from
 	 * two byes instead of one byte
 	 */
-	if (resp->cmd == 0x30) {
+	if (resp->cmd == 0x30 || resp->cmd == 0x31) {
 		for (; bi < dword_len + 2; bi++) {
 			buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG,
 							  bi);
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 0470b1dfc..33ca659cd 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -4366,4 +4366,16 @@ struct ixgbe_hw {
 #define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD	\
 				(0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT)
 
+/* Code Command (Flash I/F Interface) */
+#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD			0x30
+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD		0x31
+#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD			0x32
+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD		0x33
+#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD		0x34
+#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD		0x35
+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD		0x36
+#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD			0x37
+#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD			0x38
+#define IXGBE_HOST_INTERFACE_MASK_CMD				0x000000FF
+
 #endif /* _IXGBE_TYPE_H_ */
-- 
2.17.1


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

* [dpdk-stable] [PATCH v2 05/20] net/ixgbe/base: fix x550em 10G NIC link status report
       [not found] ` <20200702031329.4495-1-guinanx.sun@intel.com>
  2020-07-02  3:13   ` [dpdk-stable] [PATCH v2 03/20] net/ixgbe/base: fix host interface shadow RAM read Guinan Sun
@ 2020-07-02  3:13   ` Guinan Sun
       [not found]   ` <20200709080046.65879-1-guinanx.sun@intel.com>
  2 siblings, 0 replies; 4+ messages in thread
From: Guinan Sun @ 2020-07-02  3:13 UTC (permalink / raw)
  To: dev; +Cc: Jeff Guo, Zhao1 Wei, Guinan Sun, stable, Piotr Skajewski

With the NVM image for x550em XFI will not report
the auto-negotiation feature correctly. The auto-negotiation
should be "No" for supports and advertised items.
At the same time update speed makes it support 1G and 10G.

Fixes: 833df43399e7 ("net/ixgbe/base: add SGMII link for X550")
Cc: stable@dpdk.org

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 3de406fd3..9fa999e01 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -1891,7 +1891,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
 		else
 			*speed = IXGBE_LINK_SPEED_10GB_FULL;
 	} else {
+		*autoneg = true;
+
 		switch (hw->phy.type) {
+		case ixgbe_phy_x550em_xfi:
+			*speed = IXGBE_LINK_SPEED_1GB_FULL |
+				 IXGBE_LINK_SPEED_10GB_FULL;
+			*autoneg = false;
+			break;
 		case ixgbe_phy_ext_1g_t:
 #ifdef PREBOOT_SUPPORT
 			*speed = IXGBE_LINK_SPEED_1GB_FULL;
@@ -1925,7 +1932,6 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
 				 IXGBE_LINK_SPEED_1GB_FULL;
 			break;
 		}
-		*autoneg = true;
 	}
 
 	return IXGBE_SUCCESS;
-- 
2.17.1


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

* [dpdk-stable] [PATCH v3 01/19] net/ixgbe/base: fix host interface shadow RAM read
       [not found]   ` <20200709080046.65879-1-guinanx.sun@intel.com>
@ 2020-07-09  8:00     ` Guinan Sun
  2020-07-09  8:00     ` [dpdk-stable] [PATCH v3 03/19] net/ixgbe/base: fix x550em 10G NIC link status report Guinan Sun
  1 sibling, 0 replies; 4+ messages in thread
From: Guinan Sun @ 2020-07-09  8:00 UTC (permalink / raw)
  To: dev; +Cc: Jeff Guo, Zhao1 Wei, Guinan Sun, stable, Mateusz Kowalski

Host interface Shadow RAM Read (0x31) command response
buffer length should be stored in two bytes, instead of one byte.
This patch fixes it.

Fixes: e6102361b1d4 ("net/ixgbe/base: use 2 bytes for flash read command")
Cc: stable@dpdk.org

Signed-off-by: Mateusz Kowalski <mateusz.kowalski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c |  3 ++-
 drivers/net/ixgbe/base/ixgbe_type.h   | 12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index 4eb98dc19..5889410f9 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4600,7 +4600,8 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	 * Read Flash command requires reading buffer length from
 	 * two byes instead of one byte
 	 */
-	if (resp->cmd == 0x30) {
+	if (resp->cmd == IXGBE_HOST_INTERFACE_FLASH_READ_CMD ||
+	    resp->cmd == IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD) {
 		for (; bi < dword_len + 2; bi++) {
 			buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG,
 							  bi);
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 15e937010..bc927a34e 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -4364,4 +4364,16 @@ struct ixgbe_hw {
 #define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD	\
 				(0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT)
 
+/* Code Command (Flash I/F Interface) */
+#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD			0x30
+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD		0x31
+#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD			0x32
+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD		0x33
+#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD		0x34
+#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD		0x35
+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD		0x36
+#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD			0x37
+#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD			0x38
+#define IXGBE_HOST_INTERFACE_MASK_CMD				0x000000FF
+
 #endif /* _IXGBE_TYPE_H_ */
-- 
2.17.1


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

* [dpdk-stable] [PATCH v3 03/19] net/ixgbe/base: fix x550em 10G NIC link status report
       [not found]   ` <20200709080046.65879-1-guinanx.sun@intel.com>
  2020-07-09  8:00     ` [dpdk-stable] [PATCH v3 01/19] net/ixgbe/base: fix host interface shadow RAM read Guinan Sun
@ 2020-07-09  8:00     ` Guinan Sun
  1 sibling, 0 replies; 4+ messages in thread
From: Guinan Sun @ 2020-07-09  8:00 UTC (permalink / raw)
  To: dev; +Cc: Jeff Guo, Zhao1 Wei, Guinan Sun, stable, Piotr Skajewski

With the NVM image for x550em XFI will not report
the auto-negotiation feature correctly. The auto-negotiation
should be "No" for supports and advertised items.
At the same time update speed makes it support 1G and 10G.

Fixes: 833df43399e7 ("net/ixgbe/base: add SGMII link for X550")
Cc: stable@dpdk.org

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 3de406fd3..9fa999e01 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -1891,7 +1891,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
 		else
 			*speed = IXGBE_LINK_SPEED_10GB_FULL;
 	} else {
+		*autoneg = true;
+
 		switch (hw->phy.type) {
+		case ixgbe_phy_x550em_xfi:
+			*speed = IXGBE_LINK_SPEED_1GB_FULL |
+				 IXGBE_LINK_SPEED_10GB_FULL;
+			*autoneg = false;
+			break;
 		case ixgbe_phy_ext_1g_t:
 #ifdef PREBOOT_SUPPORT
 			*speed = IXGBE_LINK_SPEED_1GB_FULL;
@@ -1925,7 +1932,6 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
 				 IXGBE_LINK_SPEED_1GB_FULL;
 			break;
 		}
-		*autoneg = true;
 	}
 
 	return IXGBE_SUCCESS;
-- 
2.17.1


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

end of thread, other threads:[~2020-07-09  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200612032410.20864-1-guinanx.sun@intel.com>
     [not found] ` <20200702031329.4495-1-guinanx.sun@intel.com>
2020-07-02  3:13   ` [dpdk-stable] [PATCH v2 03/20] net/ixgbe/base: fix host interface shadow RAM read Guinan Sun
2020-07-02  3:13   ` [dpdk-stable] [PATCH v2 05/20] net/ixgbe/base: fix x550em 10G NIC link status report Guinan Sun
     [not found]   ` <20200709080046.65879-1-guinanx.sun@intel.com>
2020-07-09  8:00     ` [dpdk-stable] [PATCH v3 01/19] net/ixgbe/base: fix host interface shadow RAM read Guinan Sun
2020-07-09  8:00     ` [dpdk-stable] [PATCH v3 03/19] net/ixgbe/base: fix x550em 10G NIC link status report Guinan Sun

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://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/ https://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