e1000e: fix ethtool autoneg off for non-copper
authorSteve Shih <sshih@cisco.com>
Tue, 5 Apr 2016 18:30:03 +0000 (11:30 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 13 May 2016 21:23:37 +0000 (14:23 -0700)
commite11f303e3d0731a7379252192e7d02a1ae319238
tree7bcfef075cbb28c7c0eb4461717cdf328d72e510
parented7cbbce544856b20e5811de373cf92e92499771
e1000e: fix ethtool autoneg off for non-copper

This patch fixes the issues for disabling auto-negotiation and forcing
speed and duplex settings for the non-copper media.

For non-copper media, e1000_get_settings should return ETH_TP_MDI_INVALID for
eth_tp_mdix_ctrl instead of ETH_TP_MDI_AUTO so subsequent e1000_set_settings
call would not fail with -EOPNOTSUPP.

e1000_set_spd_dplx should not automatically turn autoneg back on for forced
1000 Mbps full duplex settings for non-copper media.

Cc: xe-kernel@external.cisco.com
Cc: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Steve Shih <sshih@cisco.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/ethtool.c