aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e100.c
diff options
context:
space:
mode:
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)
1669{ 1669{
1670 struct nic *nic = (struct nic *)data; 1670 struct nic *nic = (struct nic *)data;
1671 struct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET }; 1671 struct ethtool_cmd cmd = { .cmd = ETHTOOL_GSET };
1672 u32 speed;
1672 1673
1673 netif_printk(nic, timer, KERN_DEBUG, nic->netdev, 1674 netif_printk(nic, timer, KERN_DEBUG, nic->netdev,
1674 "right now = %ld\n", jiffies); 1675 "right now = %ld\n", jiffies);
@@ -1676,10 +1677,11 @@ static void e100_watchdog(unsigned long data)
1676 /* mii library handles link maintenance tasks */ 1677 /* mii library handles link maintenance tasks */
1677 1678
1678 mii_ethtool_gset(&nic->mii, &cmd); 1679 mii_ethtool_gset(&nic->mii, &cmd);
1680 speed = ethtool_cmd_speed(&cmd);
1679 1681
1680 if (mii_link_ok(&nic->mii) && !netif_carrier_ok(nic->netdev)) { 1682 if (mii_link_ok(&nic->mii) && !netif_carrier_ok(nic->netdev)) {
1681 netdev_info(nic->netdev, "NIC Link is Up %u Mbps %s Duplex\n", 1683 netdev_info(nic->netdev, "NIC Link is Up %u Mbps %s Duplex\n",
1682 cmd.speed == SPEED_100 ? 100 : 10, 1684 speed == SPEED_100 ? 100 : 10,
1683 cmd.duplex == DUPLEX_FULL ? "Full" : "Half"); 1685 cmd.duplex == DUPLEX_FULL ? "Full" : "Half");
1684 } else if (!mii_link_ok(&nic->mii) && netif_carrier_ok(nic->netdev)) { 1686 } else if (!mii_link_ok(&nic->mii) && netif_carrier_ok(nic->netdev)) {
1685 netdev_info(nic->netdev, "NIC Link is Down\n"); 1687 netdev_info(nic->netdev, "NIC Link is Down\n");
@@ -1698,13 +1700,13 @@ static void e100_watchdog(unsigned long data)
1698 spin_unlock_irq(&nic->cmd_lock); 1700 spin_unlock_irq(&nic->cmd_lock);
1699 1701
1700 e100_update_stats(nic); 1702 e100_update_stats(nic);
1701 e100_adjust_adaptive_ifs(nic, cmd.speed, cmd.duplex); 1703 e100_adjust_adaptive_ifs(nic, speed, cmd.duplex);
1702 1704
1703 if (nic->mac <= mac_82557_D100_C) 1705 if (nic->mac <= mac_82557_D100_C)
1704 /* Issue a multicast command to workaround a 557 lock up */ 1706 /* Issue a multicast command to workaround a 557 lock up */
1705 e100_set_multicast_list(nic->netdev); 1707 e100_set_multicast_list(nic->netdev);
1706 1708
1707 if (nic->flags & ich && cmd.speed==SPEED_10 && cmd.duplex==DUPLEX_HALF) 1709 if (nic->flags & ich && speed == SPEED_10 && cmd.duplex == DUPLEX_HALF)
1708 /* Need SW workaround for ICH[x] 10Mbps/half duplex Tx hang. */ 1710 /* Need SW workaround for ICH[x] 10Mbps/half duplex Tx hang. */
1709 nic->flags |= ich_10h_workaround; 1711 nic->flags |= ich_10h_workaround;
1710 else 1712 else