diff options
author | Jiri Pirko <jiri@resnulli.us> | 2014-06-06 08:17:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-06 19:24:07 -0400 |
commit | 537fae0101c8853abb52136788173dde74b9d1e9 (patch) | |
tree | e6a169f851eb766b0574ac4fbbec45f474f11998 /drivers | |
parent | 1caaab63d3ae3218a7fb1d25626d941d9ffb11dc (diff) |
net: use SPEED_UNKNOWN and DUPLEX_UNKNOWN when appropriate
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
25 files changed, 49 insertions, 49 deletions
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c b/drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c index ecacaaeb2b92..48694c239d5c 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_ethtool.c | |||
@@ -56,8 +56,8 @@ static int atl1c_get_settings(struct net_device *netdev, | |||
56 | else | 56 | else |
57 | ecmd->duplex = DUPLEX_HALF; | 57 | ecmd->duplex = DUPLEX_HALF; |
58 | } else { | 58 | } else { |
59 | ethtool_cmd_speed_set(ecmd, -1); | 59 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
60 | ecmd->duplex = -1; | 60 | ecmd->duplex = DUPLEX_UNKNOWN; |
61 | } | 61 | } |
62 | 62 | ||
63 | ecmd->autoneg = AUTONEG_ENABLE; | 63 | ecmd->autoneg = AUTONEG_ENABLE; |
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c b/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c index 206e9b7be431..1be072f4afc2 100644 --- a/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c | |||
@@ -57,8 +57,8 @@ static int atl1e_get_settings(struct net_device *netdev, | |||
57 | else | 57 | else |
58 | ecmd->duplex = DUPLEX_HALF; | 58 | ecmd->duplex = DUPLEX_HALF; |
59 | } else { | 59 | } else { |
60 | ethtool_cmd_speed_set(ecmd, -1); | 60 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
61 | ecmd->duplex = -1; | 61 | ecmd->duplex = DUPLEX_UNKNOWN; |
62 | } | 62 | } |
63 | 63 | ||
64 | ecmd->autoneg = AUTONEG_ENABLE; | 64 | ecmd->autoneg = AUTONEG_ENABLE; |
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c index dfd0e91fa726..b460db7919a2 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.c +++ b/drivers/net/ethernet/atheros/atlx/atl1.c | |||
@@ -3258,8 +3258,8 @@ static int atl1_get_settings(struct net_device *netdev, | |||
3258 | else | 3258 | else |
3259 | ecmd->duplex = DUPLEX_HALF; | 3259 | ecmd->duplex = DUPLEX_HALF; |
3260 | } else { | 3260 | } else { |
3261 | ethtool_cmd_speed_set(ecmd, -1); | 3261 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
3262 | ecmd->duplex = -1; | 3262 | ecmd->duplex = DUPLEX_UNKNOWN; |
3263 | } | 3263 | } |
3264 | if (hw->media_type == MEDIA_TYPE_AUTO_SENSOR || | 3264 | if (hw->media_type == MEDIA_TYPE_AUTO_SENSOR || |
3265 | hw->media_type == MEDIA_TYPE_1000M_FULL) | 3265 | hw->media_type == MEDIA_TYPE_1000M_FULL) |
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c index 2587fed7b02c..6746bd717146 100644 --- a/drivers/net/ethernet/atheros/atlx/atl2.c +++ b/drivers/net/ethernet/atheros/atlx/atl2.c | |||
@@ -1769,8 +1769,8 @@ static int atl2_get_settings(struct net_device *netdev, | |||
1769 | else | 1769 | else |
1770 | ecmd->duplex = DUPLEX_HALF; | 1770 | ecmd->duplex = DUPLEX_HALF; |
1771 | } else { | 1771 | } else { |
1772 | ethtool_cmd_speed_set(ecmd, -1); | 1772 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
1773 | ecmd->duplex = -1; | 1773 | ecmd->duplex = DUPLEX_UNKNOWN; |
1774 | } | 1774 | } |
1775 | 1775 | ||
1776 | ecmd->autoneg = AUTONEG_ENABLE; | 1776 | ecmd->autoneg = AUTONEG_ENABLE; |
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 0ab83708b6a1..67d2b0047371 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c | |||
@@ -6916,8 +6916,8 @@ bnx2_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
6916 | } | 6916 | } |
6917 | } | 6917 | } |
6918 | else { | 6918 | else { |
6919 | ethtool_cmd_speed_set(cmd, -1); | 6919 | ethtool_cmd_speed_set(cmd, SPEED_UNKNOWN); |
6920 | cmd->duplex = -1; | 6920 | cmd->duplex = DUPLEX_UNKNOWN; |
6921 | } | 6921 | } |
6922 | spin_unlock_bh(&bp->phy_lock); | 6922 | spin_unlock_bh(&bp->phy_lock); |
6923 | 6923 | ||
diff --git a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c index adca62b72837..882cad71ad62 100644 --- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c +++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c | |||
@@ -266,8 +266,8 @@ bnad_get_settings(struct net_device *netdev, struct ethtool_cmd *cmd) | |||
266 | ethtool_cmd_speed_set(cmd, SPEED_10000); | 266 | ethtool_cmd_speed_set(cmd, SPEED_10000); |
267 | cmd->duplex = DUPLEX_FULL; | 267 | cmd->duplex = DUPLEX_FULL; |
268 | } else { | 268 | } else { |
269 | ethtool_cmd_speed_set(cmd, -1); | 269 | ethtool_cmd_speed_set(cmd, SPEED_UNKNOWN); |
270 | cmd->duplex = -1; | 270 | cmd->duplex = DUPLEX_UNKNOWN; |
271 | } | 271 | } |
272 | cmd->transceiver = XCVR_EXTERNAL; | 272 | cmd->transceiver = XCVR_EXTERNAL; |
273 | cmd->maxtxpkt = 0; | 273 | cmd->maxtxpkt = 0; |
diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c index c1b2c1dbf015..3784a8bd1fdd 100644 --- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c +++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c | |||
@@ -580,8 +580,8 @@ static int get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
580 | ethtool_cmd_speed_set(cmd, p->link_config.speed); | 580 | ethtool_cmd_speed_set(cmd, p->link_config.speed); |
581 | cmd->duplex = p->link_config.duplex; | 581 | cmd->duplex = p->link_config.duplex; |
582 | } else { | 582 | } else { |
583 | ethtool_cmd_speed_set(cmd, -1); | 583 | ethtool_cmd_speed_set(cmd, SPEED_UNKNOWN); |
584 | cmd->duplex = -1; | 584 | cmd->duplex = DUPLEX_UNKNOWN; |
585 | } | 585 | } |
586 | 586 | ||
587 | cmd->port = (cmd->supported & SUPPORTED_TP) ? PORT_TP : PORT_FIBRE; | 587 | cmd->port = (cmd->supported & SUPPORTED_TP) ? PORT_TP : PORT_FIBRE; |
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c index 3ed507947248..5d9cce053cc9 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | |||
@@ -1809,8 +1809,8 @@ static int get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
1809 | ethtool_cmd_speed_set(cmd, p->link_config.speed); | 1809 | ethtool_cmd_speed_set(cmd, p->link_config.speed); |
1810 | cmd->duplex = p->link_config.duplex; | 1810 | cmd->duplex = p->link_config.duplex; |
1811 | } else { | 1811 | } else { |
1812 | ethtool_cmd_speed_set(cmd, -1); | 1812 | ethtool_cmd_speed_set(cmd, SPEED_UNKNOWN); |
1813 | cmd->duplex = -1; | 1813 | cmd->duplex = DUPLEX_UNKNOWN; |
1814 | } | 1814 | } |
1815 | 1815 | ||
1816 | cmd->port = (cmd->supported & SUPPORTED_TP) ? PORT_TP : PORT_FIBRE; | 1816 | cmd->port = (cmd->supported & SUPPORTED_TP) ? PORT_TP : PORT_FIBRE; |
diff --git a/drivers/net/ethernet/cisco/enic/enic_ethtool.c b/drivers/net/ethernet/cisco/enic/enic_ethtool.c index 1882db230e13..2e50b5489d20 100644 --- a/drivers/net/ethernet/cisco/enic/enic_ethtool.c +++ b/drivers/net/ethernet/cisco/enic/enic_ethtool.c | |||
@@ -104,8 +104,8 @@ static int enic_get_settings(struct net_device *netdev, | |||
104 | ethtool_cmd_speed_set(ecmd, vnic_dev_port_speed(enic->vdev)); | 104 | ethtool_cmd_speed_set(ecmd, vnic_dev_port_speed(enic->vdev)); |
105 | ecmd->duplex = DUPLEX_FULL; | 105 | ecmd->duplex = DUPLEX_FULL; |
106 | } else { | 106 | } else { |
107 | ethtool_cmd_speed_set(ecmd, -1); | 107 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
108 | ecmd->duplex = -1; | 108 | ecmd->duplex = DUPLEX_UNKNOWN; |
109 | } | 109 | } |
110 | 110 | ||
111 | ecmd->autoneg = AUTONEG_DISABLE; | 111 | ecmd->autoneg = AUTONEG_DISABLE; |
diff --git a/drivers/net/ethernet/dec/tulip/uli526x.c b/drivers/net/ethernet/dec/tulip/uli526x.c index aa801a6af7b9..80afec335a11 100644 --- a/drivers/net/ethernet/dec/tulip/uli526x.c +++ b/drivers/net/ethernet/dec/tulip/uli526x.c | |||
@@ -962,8 +962,8 @@ ULi_ethtool_gset(struct uli526x_board_info *db, struct ethtool_cmd *ecmd) | |||
962 | } | 962 | } |
963 | if(db->link_failed) | 963 | if(db->link_failed) |
964 | { | 964 | { |
965 | ethtool_cmd_speed_set(ecmd, -1); | 965 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
966 | ecmd->duplex = -1; | 966 | ecmd->duplex = DUPLEX_UNKNOWN; |
967 | } | 967 | } |
968 | 968 | ||
969 | if (db->media_mode & ULI526X_AUTO) | 969 | if (db->media_mode & ULI526X_AUTO) |
diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c index 2324f2ddfd48..1274b6fdac8a 100644 --- a/drivers/net/ethernet/dlink/dl2k.c +++ b/drivers/net/ethernet/dlink/dl2k.c | |||
@@ -1185,8 +1185,8 @@ static int rio_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
1185 | ethtool_cmd_speed_set(cmd, np->speed); | 1185 | ethtool_cmd_speed_set(cmd, np->speed); |
1186 | cmd->duplex = np->full_duplex ? DUPLEX_FULL : DUPLEX_HALF; | 1186 | cmd->duplex = np->full_duplex ? DUPLEX_FULL : DUPLEX_HALF; |
1187 | } else { | 1187 | } else { |
1188 | ethtool_cmd_speed_set(cmd, -1); | 1188 | ethtool_cmd_speed_set(cmd, SPEED_UNKNOWN); |
1189 | cmd->duplex = -1; | 1189 | cmd->duplex = DUPLEX_UNKNOWN; |
1190 | } | 1190 | } |
1191 | if ( np->an_enable) | 1191 | if ( np->an_enable) |
1192 | cmd->autoneg = AUTONEG_ENABLE; | 1192 | cmd->autoneg = AUTONEG_ENABLE; |
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c b/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c index 6055e3eaf49c..85a3866459cf 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_ethtool.c | |||
@@ -63,8 +63,8 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
63 | cmd->duplex = port->full_duplex == 1 ? | 63 | cmd->duplex = port->full_duplex == 1 ? |
64 | DUPLEX_FULL : DUPLEX_HALF; | 64 | DUPLEX_FULL : DUPLEX_HALF; |
65 | } else { | 65 | } else { |
66 | speed = ~0; | 66 | speed = SPEED_UNKNOWN; |
67 | cmd->duplex = -1; | 67 | cmd->duplex = DUPLEX_UNKNOWN; |
68 | } | 68 | } |
69 | ethtool_cmd_speed_set(cmd, speed); | 69 | ethtool_cmd_speed_set(cmd, speed); |
70 | 70 | ||
diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c index 08b207df1459..d50f78afb56d 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c +++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c | |||
@@ -168,8 +168,8 @@ static int e1000_get_settings(struct net_device *netdev, | |||
168 | else | 168 | else |
169 | ecmd->duplex = DUPLEX_HALF; | 169 | ecmd->duplex = DUPLEX_HALF; |
170 | } else { | 170 | } else { |
171 | ethtool_cmd_speed_set(ecmd, -1); | 171 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
172 | ecmd->duplex = -1; | 172 | ecmd->duplex = DUPLEX_UNKNOWN; |
173 | } | 173 | } |
174 | 174 | ||
175 | ecmd->autoneg = ((hw->media_type == e1000_media_type_fiber) || | 175 | ecmd->autoneg = ((hw->media_type == e1000_media_type_fiber) || |
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c index e9a48bb5caac..815e26c6d34b 100644 --- a/drivers/net/ethernet/intel/e1000e/ethtool.c +++ b/drivers/net/ethernet/intel/e1000e/ethtool.c | |||
@@ -159,8 +159,8 @@ static int e1000_get_settings(struct net_device *netdev, | |||
159 | ecmd->transceiver = XCVR_EXTERNAL; | 159 | ecmd->transceiver = XCVR_EXTERNAL; |
160 | } | 160 | } |
161 | 161 | ||
162 | speed = -1; | 162 | speed = SPEED_UNKNOWN; |
163 | ecmd->duplex = -1; | 163 | ecmd->duplex = DUPLEX_UNKNOWN; |
164 | 164 | ||
165 | if (netif_running(netdev)) { | 165 | if (netif_running(netdev)) { |
166 | if (netif_carrier_ok(netdev)) { | 166 | if (netif_carrier_ok(netdev)) { |
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index 80e376377c3d..fca9a0e470c3 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c | |||
@@ -229,8 +229,8 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
229 | else | 229 | else |
230 | ecmd->duplex = DUPLEX_HALF; | 230 | ecmd->duplex = DUPLEX_HALF; |
231 | } else { | 231 | } else { |
232 | ecmd->speed = -1; | 232 | ecmd->speed = SPEED_UNKNOWN; |
233 | ecmd->duplex = -1; | 233 | ecmd->duplex = DUPLEX_UNKNOWN; |
234 | } | 234 | } |
235 | if ((hw->phy.media_type == e1000_media_type_fiber) || | 235 | if ((hw->phy.media_type == e1000_media_type_fiber) || |
236 | hw->mac.autoneg) | 236 | hw->mac.autoneg) |
diff --git a/drivers/net/ethernet/intel/igbvf/ethtool.c b/drivers/net/ethernet/intel/igbvf/ethtool.c index 7d4e8559e2e9..2178f87e9f61 100644 --- a/drivers/net/ethernet/intel/igbvf/ethtool.c +++ b/drivers/net/ethernet/intel/igbvf/ethtool.c | |||
@@ -101,8 +101,8 @@ static int igbvf_get_settings(struct net_device *netdev, | |||
101 | else | 101 | else |
102 | ecmd->duplex = DUPLEX_HALF; | 102 | ecmd->duplex = DUPLEX_HALF; |
103 | } else { | 103 | } else { |
104 | ethtool_cmd_speed_set(ecmd, -1); | 104 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
105 | ecmd->duplex = -1; | 105 | ecmd->duplex = DUPLEX_UNKNOWN; |
106 | } | 106 | } |
107 | 107 | ||
108 | ecmd->autoneg = AUTONEG_DISABLE; | 108 | ecmd->autoneg = AUTONEG_DISABLE; |
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c b/drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c index 1da2d987d370..b311e9e710d2 100644 --- a/drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c +++ b/drivers/net/ethernet/intel/ixgb/ixgb_ethtool.c | |||
@@ -107,8 +107,8 @@ ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
107 | ethtool_cmd_speed_set(ecmd, SPEED_10000); | 107 | ethtool_cmd_speed_set(ecmd, SPEED_10000); |
108 | ecmd->duplex = DUPLEX_FULL; | 108 | ecmd->duplex = DUPLEX_FULL; |
109 | } else { | 109 | } else { |
110 | ethtool_cmd_speed_set(ecmd, -1); | 110 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
111 | ecmd->duplex = -1; | 111 | ecmd->duplex = DUPLEX_UNKNOWN; |
112 | } | 112 | } |
113 | 113 | ||
114 | ecmd->autoneg = AUTONEG_DISABLE; | 114 | ecmd->autoneg = AUTONEG_DISABLE; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 23e4e6a4b4b1..a452730a3278 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | |||
@@ -296,8 +296,8 @@ static int ixgbe_get_settings(struct net_device *netdev, | |||
296 | } | 296 | } |
297 | ecmd->duplex = DUPLEX_FULL; | 297 | ecmd->duplex = DUPLEX_FULL; |
298 | } else { | 298 | } else { |
299 | ethtool_cmd_speed_set(ecmd, -1); | 299 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
300 | ecmd->duplex = -1; | 300 | ecmd->duplex = DUPLEX_UNKNOWN; |
301 | } | 301 | } |
302 | 302 | ||
303 | return 0; | 303 | return 0; |
diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c index a757f0734719..d420f124633f 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c +++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c | |||
@@ -135,8 +135,8 @@ static int ixgbevf_get_settings(struct net_device *netdev, | |||
135 | ethtool_cmd_speed_set(ecmd, speed); | 135 | ethtool_cmd_speed_set(ecmd, speed); |
136 | ecmd->duplex = DUPLEX_FULL; | 136 | ecmd->duplex = DUPLEX_FULL; |
137 | } else { | 137 | } else { |
138 | ethtool_cmd_speed_set(ecmd, -1); | 138 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
139 | ecmd->duplex = -1; | 139 | ecmd->duplex = DUPLEX_UNKNOWN; |
140 | } | 140 | } |
141 | 141 | ||
142 | return 0; | 142 | return 0; |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index c021c96294fb..fa1a069e14e6 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | |||
@@ -378,8 +378,8 @@ static int mlx4_en_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
378 | ethtool_cmd_speed_set(cmd, priv->port_state.link_speed); | 378 | ethtool_cmd_speed_set(cmd, priv->port_state.link_speed); |
379 | cmd->duplex = DUPLEX_FULL; | 379 | cmd->duplex = DUPLEX_FULL; |
380 | } else { | 380 | } else { |
381 | ethtool_cmd_speed_set(cmd, -1); | 381 | ethtool_cmd_speed_set(cmd, SPEED_UNKNOWN); |
382 | cmd->duplex = -1; | 382 | cmd->duplex = DUPLEX_UNKNOWN; |
383 | } | 383 | } |
384 | 384 | ||
385 | if (trans_type > 0 && trans_type <= 0xC) { | 385 | if (trans_type > 0 && trans_type <= 0xC) { |
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c index e3cf38e6ce3c..be587647c706 100644 --- a/drivers/net/ethernet/neterion/s2io.c +++ b/drivers/net/ethernet/neterion/s2io.c | |||
@@ -5360,8 +5360,8 @@ static int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info) | |||
5360 | ethtool_cmd_speed_set(info, SPEED_10000); | 5360 | ethtool_cmd_speed_set(info, SPEED_10000); |
5361 | info->duplex = DUPLEX_FULL; | 5361 | info->duplex = DUPLEX_FULL; |
5362 | } else { | 5362 | } else { |
5363 | ethtool_cmd_speed_set(info, -1); | 5363 | ethtool_cmd_speed_set(info, SPEED_UNKNOWN); |
5364 | info->duplex = -1; | 5364 | info->duplex = DUPLEX_UNKNOWN; |
5365 | } | 5365 | } |
5366 | 5366 | ||
5367 | info->autoneg = AUTONEG_DISABLE; | 5367 | info->autoneg = AUTONEG_DISABLE; |
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-ethtool.c b/drivers/net/ethernet/neterion/vxge/vxge-ethtool.c index ddcc81ad1ae1..b07d552a27d4 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-ethtool.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-ethtool.c | |||
@@ -62,8 +62,8 @@ static int vxge_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info) | |||
62 | ethtool_cmd_speed_set(info, SPEED_10000); | 62 | ethtool_cmd_speed_set(info, SPEED_10000); |
63 | info->duplex = DUPLEX_FULL; | 63 | info->duplex = DUPLEX_FULL; |
64 | } else { | 64 | } else { |
65 | ethtool_cmd_speed_set(info, -1); | 65 | ethtool_cmd_speed_set(info, SPEED_UNKNOWN); |
66 | info->duplex = -1; | 66 | info->duplex = DUPLEX_UNKNOWN; |
67 | } | 67 | } |
68 | 68 | ||
69 | info->autoneg = AUTONEG_DISABLE; | 69 | info->autoneg = AUTONEG_DISABLE; |
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index 6f255f534d25..9afc536c5734 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c | |||
@@ -4285,8 +4285,8 @@ static int nv_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
4285 | if (np->duplex) | 4285 | if (np->duplex) |
4286 | ecmd->duplex = DUPLEX_FULL; | 4286 | ecmd->duplex = DUPLEX_FULL; |
4287 | } else { | 4287 | } else { |
4288 | speed = -1; | 4288 | speed = SPEED_UNKNOWN; |
4289 | ecmd->duplex = -1; | 4289 | ecmd->duplex = DUPLEX_UNKNOWN; |
4290 | } | 4290 | } |
4291 | ethtool_cmd_speed_set(ecmd, speed); | 4291 | ethtool_cmd_speed_set(ecmd, speed); |
4292 | ecmd->autoneg = np->autoneg; | 4292 | ecmd->autoneg = np->autoneg; |
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c index 114d2fe52cc2..4fe8ea96bd25 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c | |||
@@ -91,7 +91,7 @@ static int pch_gbe_get_settings(struct net_device *netdev, | |||
91 | ecmd->advertising &= ~(ADVERTISED_TP | ADVERTISED_1000baseT_Half); | 91 | ecmd->advertising &= ~(ADVERTISED_TP | ADVERTISED_1000baseT_Half); |
92 | 92 | ||
93 | if (!netif_carrier_ok(adapter->netdev)) | 93 | if (!netif_carrier_ok(adapter->netdev)) |
94 | ethtool_cmd_speed_set(ecmd, -1); | 94 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
95 | return ret; | 95 | return ret; |
96 | } | 96 | } |
97 | 97 | ||
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c index 9396cca93b09..40c1c7b0d9e0 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c | |||
@@ -431,8 +431,8 @@ vmxnet3_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
431 | ethtool_cmd_speed_set(ecmd, adapter->link_speed); | 431 | ethtool_cmd_speed_set(ecmd, adapter->link_speed); |
432 | ecmd->duplex = DUPLEX_FULL; | 432 | ecmd->duplex = DUPLEX_FULL; |
433 | } else { | 433 | } else { |
434 | ethtool_cmd_speed_set(ecmd, -1); | 434 | ethtool_cmd_speed_set(ecmd, SPEED_UNKNOWN); |
435 | ecmd->duplex = -1; | 435 | ecmd->duplex = DUPLEX_UNKNOWN; |
436 | } | 436 | } |
437 | return 0; | 437 | return 0; |
438 | } | 438 | } |