Skip to contentSkip to conversation

ixgbe: fix media type detection for E610 device

PATCH Superseded Piotr Kwapulinski 2 participants 2 messages Feb 21, 2025

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ixgbe: fix media type detection for E610 device

The commit 23c0e5a16bcc ("ixgbe: Add link management support for E610 device") introduced incorrect media type detection for E610 device. It reproduces when advertised speed is modified after driver reload. Clear the previous outdated PHY type high value.

Reproduction steps:
modprobe ixgbe
ethtool -s eth0 advertise 0x1000000000000
rmmod ixgbe
modprobe ixgbe
ethtool -s eth0 advertise 0x1000000000000

Fixes 23c0e5a16bcc ("ixgbe: Add link management support for E610 device")

---
v1 -> v2
More commit message details and reproduction steps added

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +3 -1
index 683c668..0dfefd2 100644
@@ -1453,9 +1453,11 @@ enum ixgbe_media_type ixgbe_get_media_type_e610(struct ixgbe_hw *hw)
 			hw->link.link_info.phy_type_low = 0;
 		} else {
 			highest_bit = fls64(le64_to_cpu(pcaps.phy_type_low));
-			if (highest_bit)
+			if (highest_bit) {
 				hw->link.link_info.phy_type_low =
 					BIT_ULL(highest_bit - 1);
+				hw->link.link_info.phy_type_high = 0;
+			}
 		}
 	}
 
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#1 lore raw

Dear Piotr,

Thank you for the improved version. Two minor nits should you resend.

Am 21.02.25 um 14:53 schrieb Piotr Kwapulinski:

Quoted 9 lines

The commit 23c0e5a16bcc ("ixgbe: Add link management support for E610 device") introduced incorrect media type detection for E610 device. It reproduces when advertised speed is modified after driver reload. Clear the previous outdated PHY type high value.

Reproduction steps:
modprobe ixgbe
ethtool -s eth0 advertise 0x1000000000000
rmmod ixgbe

As you use modprobe over insmod, you could also used modprobe -r.

Quoted 2 lines

modprobe ixgbe
ethtool -s eth0 advertise 0x1000000000000

Is now an error printed?

Quoted 17 lines
Fixes 23c0e5a16bcc ("ixgbe: Add link management support for E610 device")

---
v1 -> v2
More commit message details and reproduction steps added

---
  drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +0 -0
index 683c668..0dfefd2 100644
@@ -1453,9 +1453,11 @@ enum ixgbe_media_type ixgbe_get_media_type_e610(struct ixgbe_hw *hw)
  			hw->link.link_info.phy_type_low = 0;
  		} else {

drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c enum ixgbe_media_type ixgbe_get_media_type_e610(struct ixgbe_hw *hw) · line 1463

Quoted 10 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c +3 -1
  			highest_bit = fls64(le64_to_cpu(pcaps.phy_type_low));
-			if (highest_bit)
+			if (highest_bit) {
  				hw->link.link_info.phy_type_low =
  					BIT_ULL(highest_bit - 1);
+				hw->link.link_info.phy_type_high = 0;
+			}
  		}
  	}
 

Kind regards,

Paul