summaryrefslogtreecommitdiff
path: root/drivers/net/e100.c
diff options
context:
space:
mode:
authorDavid Decotigny <decot@google.com>2011-04-27 22:32:39 +0400
committerDavid S. Miller <davem@davemloft.net>2011-04-30 01:03:00 +0400
commit25db0338813a8915457636b1f6abe6a28fa73f8d (patch)
tree29ea39e45de1342beb4e3c58da0cfbc9915b617e /drivers/net/e100.c
parent8ae6daca85c8bbd6a32c382db5e2a2a989f8bed2 (diff)
downloadlinux-25db0338813a8915457636b1f6abe6a28fa73f8d.tar.xz
ethtool: Use full 32 bit speed range in ethtool's set_settings
This makes sure the ethtool's set_settings() callback of network drivers don't ignore the 16 most significant bits when ethtool calls their set_settings(). All drivers compiled with make allyesconfig on x86_64 have been updated. Signed-off-by: David Decotigny <decot@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r--drivers/net/e100.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 66ba596a4d37..c810cda3bf1f 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1669,6 +1669,7 @@ static void e100_watchdog(unsigned long data)
{
struct nic *nic = (struct nic *)data;
struct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET };
+ u32 speed;
netif_printk(nic, timer, KERN_DEBUG, nic->netdev,
"right now = %ld\n", jiffies);
@@ -1676,10 +1677,11 @@ static void e100_watchdog(unsigned long data)
/* mii library handles link maintenance tasks */
mii_ethtool_gset(&nic->mii, &cmd);
+ speed = ethtool_cmd_speed(&cmd);
if (mii_link_ok(&nic->mii) && !netif_carrier_ok(nic->netdev)) {
netdev_info(nic->netdev, "NIC Link is Up %u Mbps %s Duplex\n",
- cmd.speed == SPEED_100 ? 100 : 10,
+ speed == SPEED_100 ? 100 : 10,
cmd.duplex == DUPLEX_FULL ? "Full" : "Half");
} else if (!mii_link_ok(&nic->mii) && netif_carrier_ok(nic->netdev)) {
netdev_info(nic->netdev, "NIC Link is Down\n");
@@ -1698,13 +1700,13 @@ static void e100_watchdog(unsigned long data)
spin_unlock_irq(&nic->cmd_lock);
e100_update_stats(nic);
- e100_adjust_adaptive_ifs(nic, cmd.speed, cmd.duplex);
+ e100_adjust_adaptive_ifs(nic, speed, cmd.duplex);
if (nic->mac <= mac_82557_D100_C)
/* Issue a multicast command to workaround a 557 lock up */
e100_set_multicast_list(nic->netdev);
- if (nic->flags & ich && cmd.speed==SPEED_10 && cmd.duplex==DUPLEX_HALF)
+ if (nic->flags & ich && speed == SPEED_10 && cmd.duplex == DUPLEX_HALF)
/* Need SW workaround for ICH[x] 10Mbps/half duplex Tx hang. */
nic->flags |= ich_10h_workaround;
else