Commit a3801379 authored by Mallikarjuna R Chilakala's avatar Mallikarjuna R Chilakala Committed by David S. Miller

ixgbe: Fix device capabilities of 82599 single speed fiber NICs.

82599 single speed fiber modules only support 10G/Full. Return
proper device capabilities while querrying the adapter and error
while changing device advertisement/speed/duplex capabilities.
Signed-off-by: default avatarMallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 88d2b81f
...@@ -139,7 +139,7 @@ static int ixgbe_get_settings(struct net_device *netdev, ...@@ -139,7 +139,7 @@ static int ixgbe_get_settings(struct net_device *netdev,
ecmd->autoneg = AUTONEG_ENABLE; ecmd->autoneg = AUTONEG_ENABLE;
ecmd->transceiver = XCVR_EXTERNAL; ecmd->transceiver = XCVR_EXTERNAL;
if ((hw->phy.media_type == ixgbe_media_type_copper) || if ((hw->phy.media_type == ixgbe_media_type_copper) ||
(hw->mac.type == ixgbe_mac_82599EB)) { (hw->phy.multispeed_fiber)) {
ecmd->supported |= (SUPPORTED_1000baseT_Full | ecmd->supported |= (SUPPORTED_1000baseT_Full |
SUPPORTED_Autoneg); SUPPORTED_Autoneg);
...@@ -217,7 +217,7 @@ static int ixgbe_set_settings(struct net_device *netdev, ...@@ -217,7 +217,7 @@ static int ixgbe_set_settings(struct net_device *netdev,
s32 err = 0; s32 err = 0;
if ((hw->phy.media_type == ixgbe_media_type_copper) || if ((hw->phy.media_type == ixgbe_media_type_copper) ||
(hw->mac.type == ixgbe_mac_82599EB)) { (hw->phy.multispeed_fiber)) {
/* 10000/copper and 1000/copper must autoneg /* 10000/copper and 1000/copper must autoneg
* this function does not support any duplex forcing, but can * this function does not support any duplex forcing, but can
* limit the advertising of the adapter to only 10000 or 1000 */ * limit the advertising of the adapter to only 10000 or 1000 */
...@@ -245,6 +245,7 @@ static int ixgbe_set_settings(struct net_device *netdev, ...@@ -245,6 +245,7 @@ static int ixgbe_set_settings(struct net_device *netdev,
} else { } else {
/* in this case we currently only support 10Gb/FULL */ /* in this case we currently only support 10Gb/FULL */
if ((ecmd->autoneg == AUTONEG_ENABLE) || if ((ecmd->autoneg == AUTONEG_ENABLE) ||
(ecmd->advertising != ADVERTISED_10000baseT_Full) ||
(ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL)) (ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL))
return -EINVAL; return -EINVAL;
} }
......
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