diff options
author | Don Skidmore <donald.c.skidmore@intel.com> | 2011-03-18 05:32:53 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-04-13 22:23:11 -0400 |
commit | 032b4325b61b03f87f0346d0e92e39f785e24105 (patch) | |
tree | 10d20725cd30ad4c5daed140c779307f9f393f3f /drivers/net/ixgbe/ixgbe_ethtool.c | |
parent | 0fa6d83258252695203d24c8818092644df10fd7 (diff) |
ixgbe: cleanup short msleep's (<20ms) to use usleep_range
Since msleep might not sleep for the desired amount when less
than 20ms use usleep_range.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 76380a2b35aa..5005a36f8593 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -931,7 +931,7 @@ static int ixgbe_set_ringparam(struct net_device *netdev, | |||
931 | } | 931 | } |
932 | 932 | ||
933 | while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state)) | 933 | while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state)) |
934 | msleep(1); | 934 | usleep_range(1000, 2000); |
935 | 935 | ||
936 | if (!netif_running(adapter->netdev)) { | 936 | if (!netif_running(adapter->netdev)) { |
937 | for (i = 0; i < adapter->num_tx_queues; i++) | 937 | for (i = 0; i < adapter->num_tx_queues; i++) |
@@ -1417,7 +1417,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1417 | 1417 | ||
1418 | /* Disable all the interrupts */ | 1418 | /* Disable all the interrupts */ |
1419 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); | 1419 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); |
1420 | msleep(10); | 1420 | usleep_range(10000, 20000); |
1421 | 1421 | ||
1422 | /* Test each interrupt */ | 1422 | /* Test each interrupt */ |
1423 | for (; i < 10; i++) { | 1423 | for (; i < 10; i++) { |
@@ -1437,7 +1437,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1437 | ~mask & 0x00007FFF); | 1437 | ~mask & 0x00007FFF); |
1438 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, | 1438 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, |
1439 | ~mask & 0x00007FFF); | 1439 | ~mask & 0x00007FFF); |
1440 | msleep(10); | 1440 | usleep_range(10000, 20000); |
1441 | 1441 | ||
1442 | if (adapter->test_icr & mask) { | 1442 | if (adapter->test_icr & mask) { |
1443 | *data = 3; | 1443 | *data = 3; |
@@ -1454,7 +1454,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1454 | adapter->test_icr = 0; | 1454 | adapter->test_icr = 0; |
1455 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); | 1455 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); |
1456 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); | 1456 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); |
1457 | msleep(10); | 1457 | usleep_range(10000, 20000); |
1458 | 1458 | ||
1459 | if (!(adapter->test_icr &mask)) { | 1459 | if (!(adapter->test_icr &mask)) { |
1460 | *data = 4; | 1460 | *data = 4; |
@@ -1474,7 +1474,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1474 | ~mask & 0x00007FFF); | 1474 | ~mask & 0x00007FFF); |
1475 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, | 1475 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, |
1476 | ~mask & 0x00007FFF); | 1476 | ~mask & 0x00007FFF); |
1477 | msleep(10); | 1477 | usleep_range(10000, 20000); |
1478 | 1478 | ||
1479 | if (adapter->test_icr) { | 1479 | if (adapter->test_icr) { |
1480 | *data = 5; | 1480 | *data = 5; |
@@ -1485,7 +1485,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) | |||
1485 | 1485 | ||
1486 | /* Disable all the interrupts */ | 1486 | /* Disable all the interrupts */ |
1487 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); | 1487 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); |
1488 | msleep(10); | 1488 | usleep_range(10000, 20000); |
1489 | 1489 | ||
1490 | /* Unhook test interrupt handler */ | 1490 | /* Unhook test interrupt handler */ |
1491 | free_irq(irq, netdev); | 1491 | free_irq(irq, netdev); |
@@ -1613,7 +1613,7 @@ static int ixgbe_setup_loopback_test(struct ixgbe_adapter *adapter) | |||
1613 | reg_data |= IXGBE_AUTOC_LMS_10G_LINK_NO_AN | IXGBE_AUTOC_FLU; | 1613 | reg_data |= IXGBE_AUTOC_LMS_10G_LINK_NO_AN | IXGBE_AUTOC_FLU; |
1614 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_AUTOC, reg_data); | 1614 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_AUTOC, reg_data); |
1615 | IXGBE_WRITE_FLUSH(&adapter->hw); | 1615 | IXGBE_WRITE_FLUSH(&adapter->hw); |
1616 | msleep(10); | 1616 | usleep_range(10000, 20000); |
1617 | 1617 | ||
1618 | /* Disable Atlas Tx lanes; re-enabled in reset path */ | 1618 | /* Disable Atlas Tx lanes; re-enabled in reset path */ |
1619 | if (hw->mac.type == ixgbe_mac_82598EB) { | 1619 | if (hw->mac.type == ixgbe_mac_82598EB) { |