Commit b876a744 authored by Greg Rose's avatar Greg Rose Committed by Jeff Kirsher

ixgbevf: Fix link speed message to support 100Mbps

The X540 can link at 100Mbps - fix the link speed indicator message to
show that value.
Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
Tested-by: default avatarSibai Li <sibai.li@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 43dc4e01
...@@ -2245,10 +2245,23 @@ static void ixgbevf_watchdog_task(struct work_struct *work) ...@@ -2245,10 +2245,23 @@ static void ixgbevf_watchdog_task(struct work_struct *work)
if (link_up) { if (link_up) {
if (!netif_carrier_ok(netdev)) { if (!netif_carrier_ok(netdev)) {
char *link_speed_string;
switch (link_speed) {
case IXGBE_LINK_SPEED_10GB_FULL:
link_speed_string = "10 Gbps";
break;
case IXGBE_LINK_SPEED_1GB_FULL:
link_speed_string = "1 Gbps";
break;
case IXGBE_LINK_SPEED_100_FULL:
link_speed_string = "100 Mbps";
break;
default:
link_speed_string = "unknown speed";
break;
}
dev_info(&adapter->pdev->dev, dev_info(&adapter->pdev->dev,
"NIC Link is Up, %u Gbps\n", "NIC Link is Up, %s\n", link_speed_string);
(link_speed == IXGBE_LINK_SPEED_10GB_FULL) ?
10 : 1);
netif_carrier_on(netdev); netif_carrier_on(netdev);
netif_tx_wake_all_queues(netdev); netif_tx_wake_all_queues(netdev);
} }
......
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