aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_ethtool.c
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2008-10-31 03:46:40 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-11-02 08:00:32 -0500
commit0befdb3e0a26a8949063915274e1bec8873c526b (patch)
treea0b0b94919131a3e1952136f3c93b0c52a211fea /drivers/net/ixgbe/ixgbe_ethtool.c
parente053b628d367cd7b39ae2c4bb0124edc2e058a41 (diff)
ixgbe: add device support for 82598AT (copper 10GbE) adapters
Intel is currently shipping support for adapters with a phy that does 10GBase-T (copper), which is 10 Gigabit ethernet over standard Category 6 cabling. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 81a9c4b8672..fee56a38381 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -149,6 +149,8 @@ static int ixgbe_set_settings(struct net_device *netdev,
149{ 149{
150 struct ixgbe_adapter *adapter = netdev_priv(netdev); 150 struct ixgbe_adapter *adapter = netdev_priv(netdev);
151 struct ixgbe_hw *hw = &adapter->hw; 151 struct ixgbe_hw *hw = &adapter->hw;
152 u32 advertised, old;
153 s32 err;
152 154
153 switch (hw->phy.media_type) { 155 switch (hw->phy.media_type) {
154 case ixgbe_media_type_fiber: 156 case ixgbe_media_type_fiber:
@@ -157,6 +159,31 @@ static int ixgbe_set_settings(struct net_device *netdev,
157 return -EINVAL; 159 return -EINVAL;
158 /* in this case we currently only support 10Gb/FULL */ 160 /* in this case we currently only support 10Gb/FULL */
159 break; 161 break;
162 case ixgbe_media_type_copper:
163 /* 10000/copper and 1000/copper must autoneg
164 * this function does not support any duplex forcing, but can
165 * limit the advertising of the adapter to only 10000 or 1000 */
166 if (ecmd->autoneg == AUTONEG_DISABLE)
167 return -EINVAL;
168
169 old = hw->phy.autoneg_advertised;
170 advertised = 0;
171 if (ecmd->advertising & ADVERTISED_10000baseT_Full)
172 advertised |= IXGBE_LINK_SPEED_10GB_FULL;
173
174 if (ecmd->advertising & ADVERTISED_1000baseT_Full)
175 advertised |= IXGBE_LINK_SPEED_1GB_FULL;
176
177 if (old == advertised)
178 break;
179 /* this sets the link speed and restarts auto-neg */
180 err = hw->mac.ops.setup_link_speed(hw, advertised, true, true);
181 if (err) {
182 DPRINTK(PROBE, INFO,
183 "setup link failed with code %d\n", err);
184 hw->mac.ops.setup_link_speed(hw, old, true, true);
185 }
186 break;
160 default: 187 default:
161 break; 188 break;
162 } 189 }