Commit 41fcfbea authored by Akeem G Abodunrin's avatar Akeem G Abodunrin Committed by Jeff Kirsher

igb: Implementation to report advertised/supported link on i354 devices

This patch changes the way we report supported/advertised link for i354
devices, especially for 2.5 GB. Instead of reporting 2.5 GB for all i354
devices erroneously, check first, if it is 2.5 GB capable.
Signed-off-by: default avatarAkeem G Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent f6878e39
...@@ -172,10 +172,7 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ...@@ -172,10 +172,7 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
SUPPORTED_Autoneg | SUPPORTED_Autoneg |
SUPPORTED_Pause); SUPPORTED_Pause);
ecmd->advertising = ADVERTISED_FIBRE; ecmd->advertising = ADVERTISED_FIBRE;
if (hw->mac.type == e1000_i354) {
ecmd->supported |= SUPPORTED_2500baseX_Full;
ecmd->advertising |= ADVERTISED_2500baseX_Full;
}
if ((eth_flags->e1000_base_lx) || (eth_flags->e1000_base_sx)) { if ((eth_flags->e1000_base_lx) || (eth_flags->e1000_base_sx)) {
ecmd->supported |= SUPPORTED_1000baseT_Full; ecmd->supported |= SUPPORTED_1000baseT_Full;
ecmd->advertising |= ADVERTISED_1000baseT_Full; ecmd->advertising |= ADVERTISED_1000baseT_Full;
...@@ -209,16 +206,23 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ...@@ -209,16 +206,23 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
status = rd32(E1000_STATUS); status = rd32(E1000_STATUS);
if (status & E1000_STATUS_LU) { if (status & E1000_STATUS_LU) {
if ((hw->mac.type == e1000_i354) && if (hw->mac.type == e1000_i354) {
(status & E1000_STATUS_2P5_SKU) && if ((status & E1000_STATUS_2P5_SKU) &&
!(status & E1000_STATUS_2P5_SKU_OVER)) !(status & E1000_STATUS_2P5_SKU_OVER)) {
ecmd->supported = SUPPORTED_2500baseX_Full;
ecmd->advertising = ADVERTISED_2500baseX_Full;
ecmd->speed = SPEED_2500; ecmd->speed = SPEED_2500;
else if (status & E1000_STATUS_SPEED_1000) } else {
ecmd->supported = SUPPORTED_1000baseT_Full;
ecmd->advertising = ADVERTISED_1000baseT_Full;
}
} else if (status & E1000_STATUS_SPEED_1000) {
ecmd->speed = SPEED_1000; ecmd->speed = SPEED_1000;
else if (status & E1000_STATUS_SPEED_100) } else if (status & E1000_STATUS_SPEED_100) {
ecmd->speed = SPEED_100; ecmd->speed = SPEED_100;
else } else {
ecmd->speed = SPEED_10; ecmd->speed = SPEED_10;
}
if ((status & E1000_STATUS_FD) || if ((status & E1000_STATUS_FD) ||
hw->phy.media_type != e1000_media_type_copper) hw->phy.media_type != e1000_media_type_copper)
ecmd->duplex = DUPLEX_FULL; ecmd->duplex = DUPLEX_FULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment