Skip to content

Commit 4020659

Browse files
pkwapulianguy11
authored andcommitted
ixgbe: fix media type detection for E610 device
The commit 23c0e5a ("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 modprobe -r ixgbe modprobe ixgbe ethtool -s eth0 advertise 0x1000000000000 Result before the fix: netlink error: link settings update failed netlink error: Invalid argument Result after the fix: No output error Fixes: 23c0e5a ("ixgbe: Add link management support for E610 device") Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Bharath R <bharath.r@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent efaaf34 commit 4020659

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,9 +1453,11 @@ enum ixgbe_media_type ixgbe_get_media_type_e610(struct ixgbe_hw *hw)
14531453
hw->link.link_info.phy_type_low = 0;
14541454
} else {
14551455
highest_bit = fls64(le64_to_cpu(pcaps.phy_type_low));
1456-
if (highest_bit)
1456+
if (highest_bit) {
14571457
hw->link.link_info.phy_type_low =
14581458
BIT_ULL(highest_bit - 1);
1459+
hw->link.link_info.phy_type_high = 0;
1460+
}
14591461
}
14601462
}
14611463

0 commit comments

Comments
 (0)