mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
ixgbe: fix media type detection for E610 device
The commit23c0e5a16b("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:23c0e5a16b("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>
This commit is contained in:
parent
efaaf344bc
commit
40206599be
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user