Commit 1b1c0a48 authored by Atita Shirwaikar's avatar Atita Shirwaikar Committed by Jeff Kirsher

ixgbe: Adding 100MB FULL support in ethtool

Current driver does not show 100MB support in ethtool.
Adding support for the same.
Signed-off-by: default avatarAtita Shirwaikar <atita.shirwaikar@intel.com>
Tested-by: default avatarStephen Ko <stephen.s.ko@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 8fecce62
...@@ -152,7 +152,17 @@ static int ixgbe_get_settings(struct net_device *netdev, ...@@ -152,7 +152,17 @@ static int ixgbe_get_settings(struct net_device *netdev,
ecmd->supported |= (SUPPORTED_1000baseT_Full | ecmd->supported |= (SUPPORTED_1000baseT_Full |
SUPPORTED_Autoneg); SUPPORTED_Autoneg);
switch (hw->mac.type) {
case ixgbe_mac_X540:
ecmd->supported |= SUPPORTED_100baseT_Full;
break;
default:
break;
}
ecmd->advertising = ADVERTISED_Autoneg; ecmd->advertising = ADVERTISED_Autoneg;
if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL)
ecmd->advertising |= ADVERTISED_100baseT_Full;
if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL) if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL)
ecmd->advertising |= ADVERTISED_10000baseT_Full; ecmd->advertising |= ADVERTISED_10000baseT_Full;
if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL) if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL)
...@@ -167,6 +177,15 @@ static int ixgbe_get_settings(struct net_device *netdev, ...@@ -167,6 +177,15 @@ static int ixgbe_get_settings(struct net_device *netdev,
ecmd->advertising |= (ADVERTISED_10000baseT_Full | ecmd->advertising |= (ADVERTISED_10000baseT_Full |
ADVERTISED_1000baseT_Full); ADVERTISED_1000baseT_Full);
switch (hw->mac.type) {
case ixgbe_mac_X540:
if (!(ecmd->advertising & ADVERTISED_100baseT_Full))
ecmd->advertising |= (ADVERTISED_100baseT_Full);
break;
default:
break;
}
if (hw->phy.media_type == ixgbe_media_type_copper) { if (hw->phy.media_type == ixgbe_media_type_copper) {
ecmd->supported |= SUPPORTED_TP; ecmd->supported |= SUPPORTED_TP;
ecmd->advertising |= ADVERTISED_TP; ecmd->advertising |= ADVERTISED_TP;
...@@ -271,8 +290,19 @@ static int ixgbe_get_settings(struct net_device *netdev, ...@@ -271,8 +290,19 @@ static int ixgbe_get_settings(struct net_device *netdev,
hw->mac.ops.check_link(hw, &link_speed, &link_up, false); hw->mac.ops.check_link(hw, &link_speed, &link_up, false);
if (link_up) { if (link_up) {
ecmd->speed = (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? switch (link_speed) {
SPEED_10000 : SPEED_1000; case IXGBE_LINK_SPEED_10GB_FULL:
ecmd->speed = SPEED_10000;
break;
case IXGBE_LINK_SPEED_1GB_FULL:
ecmd->speed = SPEED_1000;
break;
case IXGBE_LINK_SPEED_100_FULL:
ecmd->speed = SPEED_100;
break;
default:
break;
}
ecmd->duplex = DUPLEX_FULL; ecmd->duplex = DUPLEX_FULL;
} else { } else {
ecmd->speed = -1; ecmd->speed = -1;
......
...@@ -6102,7 +6102,10 @@ static void ixgbe_watchdog_task(struct work_struct *work) ...@@ -6102,7 +6102,10 @@ static void ixgbe_watchdog_task(struct work_struct *work)
(link_speed == IXGBE_LINK_SPEED_10GB_FULL ? (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
"10 Gbps" : "10 Gbps" :
(link_speed == IXGBE_LINK_SPEED_1GB_FULL ? (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
"1 Gbps" : "unknown speed")), "1 Gbps" :
(link_speed == IXGBE_LINK_SPEED_100_FULL ?
"100 Mbps" :
"unknown speed"))),
((flow_rx && flow_tx) ? "RX/TX" : ((flow_rx && flow_tx) ? "RX/TX" :
(flow_rx ? "RX" : (flow_rx ? "RX" :
(flow_tx ? "TX" : "None")))); (flow_tx ? "TX" : "None"))));
......
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