patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v1 01/22] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G
       [not found] <cover.1713964707.git.anatoly.burakov@intel.com>
@ 2024-04-24 13:21 ` Anatoly Burakov
  2024-04-24 13:21 ` [PATCH v1 02/22] net/ixgbe/base: fix wrong 5G link speed reported on VF Anatoly Burakov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2024-04-24 13:21 UTC (permalink / raw)
  To: dev
  Cc: Piotr Pietruszewski, vladimir.medvedkin, bruce.richardson,
	stable, Skajewski, PiotrX, Marek Mical, Kirsher, Jeffrey T,
	Michael, Alice

From: Piotr Pietruszewski <piotr.pietruszewski@intel.com>

This reverts the following commit:

    13de2444449e ("net/ixgbe/base: remove default advertising for x550 2.5G/5G")

The commit removing advertising 2.5G and 5G speeds from
ixgbe_get_copper_speeds_supported() was supposed to disable 2.5G and 5G
during the autonegotiation with default settings. However, that change
prevented OS-specific part of the driver from forcing these speeds at
user request.

This change reverts the commit and adds 2.5G and 5G as speeds supported
by the X550.

Cc: stable@dpdk.org

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reviewed-by: Skajewski, PiotrX <piotrx.skajewski@intel.com>
Reviewed-by: Marek Mical <marekx.mical@intel.com>
Reviewed-by: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 74c5db16fa..3a8e603472 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -915,6 +915,10 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw)
 		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_100_FULL;
 
 	switch (hw->mac.type) {
+	case ixgbe_mac_X550:
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL;
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL;
+		break;
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
 		hw->phy.speeds_supported &= ~IXGBE_LINK_SPEED_100_FULL;
-- 
2.43.0


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

* [PATCH v1 02/22] net/ixgbe/base: fix wrong 5G link speed reported on VF
       [not found] <cover.1713964707.git.anatoly.burakov@intel.com>
  2024-04-24 13:21 ` [PATCH v1 01/22] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G Anatoly Burakov
@ 2024-04-24 13:21 ` Anatoly Burakov
  2024-04-24 13:21 ` [PATCH v1 03/22] net/ixgbe/base: fix PHY ID for X550 Anatoly Burakov
       [not found] ` <cover.1714744628.git.anatoly.burakov@intel.com>
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2024-04-24 13:21 UTC (permalink / raw)
  To: dev, Wei Dai
  Cc: Piotr Skajewski, vladimir.medvedkin, bruce.richardson, stable,
	Tyl, RadoslawX, Mrozowicz, SlawomirX, Michael, Alice

From: Piotr Skajewski <piotrx.skajewski@intel.com>

When 5000 Base-T was set on PF the VF reported 100 Base-T.
This patch change ixgbe_check_mac_link_vf function
where was incorrect conditional which points to PF mac types,
now it is pointing correctly to VF mac types.

Fixes: 12e20906905c ("net/ixgbe/base: include new speeds in VFLINK interpretation")
Cc: stable@dpdk.org

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Tyl, RadoslawX <radoslawx.tyl@intel.com>
Reviewed-by: Mrozowicz, SlawomirX <slawomirx.mrozowicz@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_vf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c
index 5e3ae1b519..11dbbe2a86 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_vf.c
@@ -585,7 +585,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	switch (links_reg & IXGBE_LINKS_SPEED_82599) {
 	case IXGBE_LINKS_SPEED_10G_82599:
 		*speed = IXGBE_LINK_SPEED_10GB_FULL;
-		if (hw->mac.type >= ixgbe_mac_X550) {
+		if (hw->mac.type >= ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_2_5GB_FULL;
 		}
@@ -595,7 +595,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 		break;
 	case IXGBE_LINKS_SPEED_100_82599:
 		*speed = IXGBE_LINK_SPEED_100_FULL;
-		if (hw->mac.type == ixgbe_mac_X550) {
+		if (hw->mac.type == ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_5GB_FULL;
 		}
@@ -603,7 +603,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	case IXGBE_LINKS_SPEED_10_X550EM_A:
 		*speed = IXGBE_LINK_SPEED_UNKNOWN;
 		/* Since Reserved in older MAC's */
-		if (hw->mac.type >= ixgbe_mac_X550)
+		if (hw->mac.type >= ixgbe_mac_X550_vf)
 			*speed = IXGBE_LINK_SPEED_10_FULL;
 		break;
 	default:
-- 
2.43.0


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

* [PATCH v1 03/22] net/ixgbe/base: fix PHY ID for X550
       [not found] <cover.1713964707.git.anatoly.burakov@intel.com>
  2024-04-24 13:21 ` [PATCH v1 01/22] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G Anatoly Burakov
  2024-04-24 13:21 ` [PATCH v1 02/22] net/ixgbe/base: fix wrong 5G link speed reported on VF Anatoly Burakov
@ 2024-04-24 13:21 ` Anatoly Burakov
       [not found] ` <cover.1714744628.git.anatoly.burakov@intel.com>
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2024-04-24 13:21 UTC (permalink / raw)
  To: dev, Wenzhuo Lu, Helin Zhang
  Cc: Radoslaw Tyl, vladimir.medvedkin, bruce.richardson, stable,
	Skajewski, PiotrX, Michael, Alice

From: Radoslaw Tyl <radoslawx.tyl@intel.com>

Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
because phy ID's last 4 bits are always masked, and should not be
taken into account when selecting phy type.

This patch adds default PHY ID for X550 devices with mask on last 4
bits (0xFFFFFFF0), and fixes the switch statement to use it.

Fixes: 58ddc803e412 ("ixgbe/base: add new X550 PHY ids")
Cc: stable@dpdk.org

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Skajewski, PiotrX <piotrx.skajewski@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c  | 3 +--
 drivers/net/ixgbe/base/ixgbe_type.h | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 3a8e603472..56267bb00d 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -432,8 +432,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
 	case TN1010_PHY_ID:
 		phy_type = ixgbe_phy_tn;
 		break;
-	case X550_PHY_ID2:
-	case X550_PHY_ID3:
+	case X550_PHY_ID:
 	case X540_PHY_ID:
 		phy_type = ixgbe_phy_aq;
 		break;
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 35212a561b..f709681df2 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1664,6 +1664,7 @@ struct ixgbe_dmac_config {
 #define TN1010_PHY_ID	0x00A19410
 #define TNX_FW_REV	0xB
 #define X540_PHY_ID	0x01540200
+#define X550_PHY_ID	0x01540220
 #define X550_PHY_ID2	0x01540223
 #define X550_PHY_ID3	0x01540221
 #define X557_PHY_ID	0x01540240
-- 
2.43.0


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

* [PATCH v2 01/27] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G
       [not found] ` <cover.1714744628.git.anatoly.burakov@intel.com>
@ 2024-05-03 13:57   ` Anatoly Burakov
  2024-05-03 13:57   ` [PATCH v2 02/27] net/ixgbe/base: fix wrong 5G link speed reported on VF Anatoly Burakov
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2024-05-03 13:57 UTC (permalink / raw)
  To: dev
  Cc: Piotr Pietruszewski, bruce.richardson, vladimir.medvedkin,
	stable, Skajewski, PiotrX, Marek Mical, Kirsher, Jeffrey T,
	Michael, Alice

From: Piotr Pietruszewski <piotr.pietruszewski@intel.com>

This reverts the following commit:

    13de2444449e ("net/ixgbe/base: remove default advertising for x550 2.5G/5G")

The commit removing advertising 2.5G and 5G speeds from
ixgbe_get_copper_speeds_supported() was supposed to disable 2.5G and 5G
during the autonegotiation with default settings. However, that change
prevented OS-specific part of the driver from forcing these speeds at
user request.

This change reverts the commit and adds 2.5G and 5G as speeds supported
by the X550.

Cc: stable@dpdk.org

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reviewed-by: Skajewski, PiotrX <piotrx.skajewski@intel.com>
Reviewed-by: Marek Mical <marekx.mical@intel.com>
Reviewed-by: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 74c5db16fa..3a8e603472 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -915,6 +915,10 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw)
 		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_100_FULL;
 
 	switch (hw->mac.type) {
+	case ixgbe_mac_X550:
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL;
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL;
+		break;
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
 		hw->phy.speeds_supported &= ~IXGBE_LINK_SPEED_100_FULL;
-- 
2.43.0


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

* [PATCH v2 02/27] net/ixgbe/base: fix wrong 5G link speed reported on VF
       [not found] ` <cover.1714744628.git.anatoly.burakov@intel.com>
  2024-05-03 13:57   ` [PATCH v2 01/27] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G Anatoly Burakov
@ 2024-05-03 13:57   ` Anatoly Burakov
  2024-05-03 13:57   ` [PATCH v2 03/27] net/ixgbe/base: fix PHY ID for X550 Anatoly Burakov
       [not found]   ` <cover.1717067518.git.anatoly.burakov@intel.com>
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2024-05-03 13:57 UTC (permalink / raw)
  To: dev, Wei Dai
  Cc: Piotr Skajewski, bruce.richardson, vladimir.medvedkin, stable,
	Tyl, RadoslawX, Mrozowicz, SlawomirX, Michael, Alice

From: Piotr Skajewski <piotrx.skajewski@intel.com>

When 5000 Base-T was set on PF the VF reported 100 Base-T.
This patch change ixgbe_check_mac_link_vf function
where was incorrect conditional which points to PF mac types,
now it is pointing correctly to VF mac types.

Fixes: 12e20906905c ("net/ixgbe/base: include new speeds in VFLINK interpretation")
Cc: stable@dpdk.org

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Tyl, RadoslawX <radoslawx.tyl@intel.com>
Reviewed-by: Mrozowicz, SlawomirX <slawomirx.mrozowicz@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_vf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c
index 5e3ae1b519..11dbbe2a86 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_vf.c
@@ -585,7 +585,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	switch (links_reg & IXGBE_LINKS_SPEED_82599) {
 	case IXGBE_LINKS_SPEED_10G_82599:
 		*speed = IXGBE_LINK_SPEED_10GB_FULL;
-		if (hw->mac.type >= ixgbe_mac_X550) {
+		if (hw->mac.type >= ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_2_5GB_FULL;
 		}
@@ -595,7 +595,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 		break;
 	case IXGBE_LINKS_SPEED_100_82599:
 		*speed = IXGBE_LINK_SPEED_100_FULL;
-		if (hw->mac.type == ixgbe_mac_X550) {
+		if (hw->mac.type == ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_5GB_FULL;
 		}
@@ -603,7 +603,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	case IXGBE_LINKS_SPEED_10_X550EM_A:
 		*speed = IXGBE_LINK_SPEED_UNKNOWN;
 		/* Since Reserved in older MAC's */
-		if (hw->mac.type >= ixgbe_mac_X550)
+		if (hw->mac.type >= ixgbe_mac_X550_vf)
 			*speed = IXGBE_LINK_SPEED_10_FULL;
 		break;
 	default:
-- 
2.43.0


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

* [PATCH v2 03/27] net/ixgbe/base: fix PHY ID for X550
       [not found] ` <cover.1714744628.git.anatoly.burakov@intel.com>
  2024-05-03 13:57   ` [PATCH v2 01/27] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G Anatoly Burakov
  2024-05-03 13:57   ` [PATCH v2 02/27] net/ixgbe/base: fix wrong 5G link speed reported on VF Anatoly Burakov
@ 2024-05-03 13:57   ` Anatoly Burakov
       [not found]   ` <cover.1717067518.git.anatoly.burakov@intel.com>
  3 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2024-05-03 13:57 UTC (permalink / raw)
  To: dev, Helin Zhang, Wenzhuo Lu
  Cc: Radoslaw Tyl, bruce.richardson, vladimir.medvedkin, stable,
	Skajewski, PiotrX, Michael, Alice

From: Radoslaw Tyl <radoslawx.tyl@intel.com>

Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
because phy ID's last 4 bits are always masked, and should not be
taken into account when selecting phy type.

This patch adds default PHY ID for X550 devices with mask on last 4
bits (0xFFFFFFF0), and fixes the switch statement to use it.

Fixes: 58ddc803e412 ("ixgbe/base: add new X550 PHY ids")
Cc: stable@dpdk.org

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Skajewski, PiotrX <piotrx.skajewski@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c  | 3 +--
 drivers/net/ixgbe/base/ixgbe_type.h | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 3a8e603472..56267bb00d 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -432,8 +432,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
 	case TN1010_PHY_ID:
 		phy_type = ixgbe_phy_tn;
 		break;
-	case X550_PHY_ID2:
-	case X550_PHY_ID3:
+	case X550_PHY_ID:
 	case X540_PHY_ID:
 		phy_type = ixgbe_phy_aq;
 		break;
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 35212a561b..f709681df2 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1664,6 +1664,7 @@ struct ixgbe_dmac_config {
 #define TN1010_PHY_ID	0x00A19410
 #define TNX_FW_REV	0xB
 #define X540_PHY_ID	0x01540200
+#define X550_PHY_ID	0x01540220
 #define X550_PHY_ID2	0x01540223
 #define X550_PHY_ID3	0x01540221
 #define X557_PHY_ID	0x01540240
-- 
2.43.0


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

* [PATCH v3 01/30] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G
       [not found]   ` <cover.1717067518.git.anatoly.burakov@intel.com>
@ 2024-05-30 11:13     ` Anatoly Burakov
  2024-05-30 11:13     ` [PATCH v3 02/30] net/ixgbe/base: fix wrong 5G link speed reported on VF Anatoly Burakov
  2024-05-30 11:13     ` [PATCH v3 03/30] net/ixgbe/base: fix PHY ID for X550 Anatoly Burakov
  2 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2024-05-30 11:13 UTC (permalink / raw)
  To: dev
  Cc: Piotr Pietruszewski, vladimir.medvedkin, bruce.richardson,
	stable, Skajewski, PiotrX, Marek Mical, Kirsher, Jeffrey T,
	Michael, Alice

From: Piotr Pietruszewski <piotr.pietruszewski@intel.com>

This reverts the following commit:

    13de2444449e ("net/ixgbe/base: remove default advertising for x550 2.5G/5G")

The commit removing advertising 2.5G and 5G speeds from
ixgbe_get_copper_speeds_supported() was supposed to disable 2.5G and 5G
during the autonegotiation with default settings. However, that change
prevented OS-specific part of the driver from forcing these speeds at
user request.

This change reverts the commit and adds 2.5G and 5G as speeds supported
by the X550.

Cc: stable@dpdk.org

Signed-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reviewed-by: Skajewski, PiotrX <piotrx.skajewski@intel.com>
Reviewed-by: Marek Mical <marekx.mical@intel.com>
Reviewed-by: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 74c5db16fa..3a8e603472 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -915,6 +915,10 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw)
 		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_100_FULL;
 
 	switch (hw->mac.type) {
+	case ixgbe_mac_X550:
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_2_5GB_FULL;
+		hw->phy.speeds_supported |= IXGBE_LINK_SPEED_5GB_FULL;
+		break;
 	case ixgbe_mac_X550EM_x:
 	case ixgbe_mac_X550EM_a:
 		hw->phy.speeds_supported &= ~IXGBE_LINK_SPEED_100_FULL;
-- 
2.43.0


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

* [PATCH v3 02/30] net/ixgbe/base: fix wrong 5G link speed reported on VF
       [not found]   ` <cover.1717067518.git.anatoly.burakov@intel.com>
  2024-05-30 11:13     ` [PATCH v3 01/30] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G Anatoly Burakov
@ 2024-05-30 11:13     ` Anatoly Burakov
  2024-05-30 11:13     ` [PATCH v3 03/30] net/ixgbe/base: fix PHY ID for X550 Anatoly Burakov
  2 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2024-05-30 11:13 UTC (permalink / raw)
  To: dev, Wei Dai
  Cc: Piotr Skajewski, vladimir.medvedkin, bruce.richardson, stable,
	Tyl, RadoslawX, Mrozowicz, SlawomirX, Michael, Alice

From: Piotr Skajewski <piotrx.skajewski@intel.com>

When 5000 Base-T was set on PF the VF reported 100 Base-T.
This patch change ixgbe_check_mac_link_vf function
where was incorrect conditional which points to PF mac types,
now it is pointing correctly to VF mac types.

Fixes: 12e20906905c ("net/ixgbe/base: include new speeds in VFLINK interpretation")
Cc: stable@dpdk.org

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Reviewed-by: Tyl, RadoslawX <radoslawx.tyl@intel.com>
Reviewed-by: Mrozowicz, SlawomirX <slawomirx.mrozowicz@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_vf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_vf.c b/drivers/net/ixgbe/base/ixgbe_vf.c
index 5e3ae1b519..11dbbe2a86 100644
--- a/drivers/net/ixgbe/base/ixgbe_vf.c
+++ b/drivers/net/ixgbe/base/ixgbe_vf.c
@@ -585,7 +585,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	switch (links_reg & IXGBE_LINKS_SPEED_82599) {
 	case IXGBE_LINKS_SPEED_10G_82599:
 		*speed = IXGBE_LINK_SPEED_10GB_FULL;
-		if (hw->mac.type >= ixgbe_mac_X550) {
+		if (hw->mac.type >= ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_2_5GB_FULL;
 		}
@@ -595,7 +595,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 		break;
 	case IXGBE_LINKS_SPEED_100_82599:
 		*speed = IXGBE_LINK_SPEED_100_FULL;
-		if (hw->mac.type == ixgbe_mac_X550) {
+		if (hw->mac.type == ixgbe_mac_X550_vf) {
 			if (links_reg & IXGBE_LINKS_SPEED_NON_STD)
 				*speed = IXGBE_LINK_SPEED_5GB_FULL;
 		}
@@ -603,7 +603,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
 	case IXGBE_LINKS_SPEED_10_X550EM_A:
 		*speed = IXGBE_LINK_SPEED_UNKNOWN;
 		/* Since Reserved in older MAC's */
-		if (hw->mac.type >= ixgbe_mac_X550)
+		if (hw->mac.type >= ixgbe_mac_X550_vf)
 			*speed = IXGBE_LINK_SPEED_10_FULL;
 		break;
 	default:
-- 
2.43.0


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

* [PATCH v3 03/30] net/ixgbe/base: fix PHY ID for X550
       [not found]   ` <cover.1717067518.git.anatoly.burakov@intel.com>
  2024-05-30 11:13     ` [PATCH v3 01/30] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G Anatoly Burakov
  2024-05-30 11:13     ` [PATCH v3 02/30] net/ixgbe/base: fix wrong 5G link speed reported on VF Anatoly Burakov
@ 2024-05-30 11:13     ` Anatoly Burakov
  2 siblings, 0 replies; 9+ messages in thread
From: Anatoly Burakov @ 2024-05-30 11:13 UTC (permalink / raw)
  To: dev, Wenzhuo Lu, Helin Zhang
  Cc: Radoslaw Tyl, vladimir.medvedkin, bruce.richardson, stable,
	Skajewski, PiotrX, Michael, Alice

From: Radoslaw Tyl <radoslawx.tyl@intel.com>

Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and
X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq
because phy ID's last 4 bits are always masked, and should not be
taken into account when selecting phy type.

This patch adds default PHY ID for X550 devices with mask on last 4
bits (0xFFFFFFF0), and fixes the switch statement to use it.

Fixes: 58ddc803e412 ("ixgbe/base: add new X550 PHY ids")
Cc: stable@dpdk.org

Signed-off-by: Radoslaw Tyl <radoslawx.tyl@intel.com>
Reviewed-by: Skajewski, PiotrX <piotrx.skajewski@intel.com>
Reviewed-by: Michael, Alice <alice.michael@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_phy.c  | 3 +--
 drivers/net/ixgbe/base/ixgbe_type.h | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c
index 3a8e603472..56267bb00d 100644
--- a/drivers/net/ixgbe/base/ixgbe_phy.c
+++ b/drivers/net/ixgbe/base/ixgbe_phy.c
@@ -432,8 +432,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)
 	case TN1010_PHY_ID:
 		phy_type = ixgbe_phy_tn;
 		break;
-	case X550_PHY_ID2:
-	case X550_PHY_ID3:
+	case X550_PHY_ID:
 	case X540_PHY_ID:
 		phy_type = ixgbe_phy_aq;
 		break;
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 35212a561b..f709681df2 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -1664,6 +1664,7 @@ struct ixgbe_dmac_config {
 #define TN1010_PHY_ID	0x00A19410
 #define TNX_FW_REV	0xB
 #define X540_PHY_ID	0x01540200
+#define X550_PHY_ID	0x01540220
 #define X550_PHY_ID2	0x01540223
 #define X550_PHY_ID3	0x01540221
 #define X557_PHY_ID	0x01540240
-- 
2.43.0


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

end of thread, other threads:[~2024-05-30 11:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1713964707.git.anatoly.burakov@intel.com>
2024-04-24 13:21 ` [PATCH v1 01/22] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G Anatoly Burakov
2024-04-24 13:21 ` [PATCH v1 02/22] net/ixgbe/base: fix wrong 5G link speed reported on VF Anatoly Burakov
2024-04-24 13:21 ` [PATCH v1 03/22] net/ixgbe/base: fix PHY ID for X550 Anatoly Burakov
     [not found] ` <cover.1714744628.git.anatoly.burakov@intel.com>
2024-05-03 13:57   ` [PATCH v2 01/27] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G Anatoly Burakov
2024-05-03 13:57   ` [PATCH v2 02/27] net/ixgbe/base: fix wrong 5G link speed reported on VF Anatoly Burakov
2024-05-03 13:57   ` [PATCH v2 03/27] net/ixgbe/base: fix PHY ID for X550 Anatoly Burakov
     [not found]   ` <cover.1717067518.git.anatoly.burakov@intel.com>
2024-05-30 11:13     ` [PATCH v3 01/30] net/ixgbe/base: revert remove default advertising for x550 2.5G/5G Anatoly Burakov
2024-05-30 11:13     ` [PATCH v3 02/30] net/ixgbe/base: fix wrong 5G link speed reported on VF Anatoly Burakov
2024-05-30 11:13     ` [PATCH v3 03/30] net/ixgbe/base: fix PHY ID for X550 Anatoly Burakov

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