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>
This commit is contained in:
committed by
David S. Miller
parent
8ae6daca85
commit
25db033881
@@ -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
|
||||
|
Reference in New Issue
Block a user