|
@@ -253,7 +253,7 @@ static int e1000_set_settings(struct net_device *netdev,
|
|
}
|
|
}
|
|
|
|
|
|
while (test_and_set_bit(__E1000_RESETTING, &adapter->state))
|
|
while (test_and_set_bit(__E1000_RESETTING, &adapter->state))
|
|
- msleep(1);
|
|
|
|
|
|
+ usleep_range(1000, 2000);
|
|
|
|
|
|
if (ecmd->autoneg == AUTONEG_ENABLE) {
|
|
if (ecmd->autoneg == AUTONEG_ENABLE) {
|
|
hw->mac.autoneg = 1;
|
|
hw->mac.autoneg = 1;
|
|
@@ -317,7 +317,7 @@ static int e1000_set_pauseparam(struct net_device *netdev,
|
|
adapter->fc_autoneg = pause->autoneg;
|
|
adapter->fc_autoneg = pause->autoneg;
|
|
|
|
|
|
while (test_and_set_bit(__E1000_RESETTING, &adapter->state))
|
|
while (test_and_set_bit(__E1000_RESETTING, &adapter->state))
|
|
- msleep(1);
|
|
|
|
|
|
+ usleep_range(1000, 2000);
|
|
|
|
|
|
if (adapter->fc_autoneg == AUTONEG_ENABLE) {
|
|
if (adapter->fc_autoneg == AUTONEG_ENABLE) {
|
|
hw->fc.requested_mode = e1000_fc_default;
|
|
hw->fc.requested_mode = e1000_fc_default;
|
|
@@ -673,7 +673,7 @@ static int e1000_set_ringparam(struct net_device *netdev,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
while (test_and_set_bit(__E1000_RESETTING, &adapter->state))
|
|
while (test_and_set_bit(__E1000_RESETTING, &adapter->state))
|
|
- msleep(1);
|
|
|
|
|
|
+ usleep_range(1000, 2000);
|
|
|
|
|
|
if (netif_running(adapter->netdev))
|
|
if (netif_running(adapter->netdev))
|
|
e1000e_down(adapter);
|
|
e1000e_down(adapter);
|
|
@@ -952,7 +952,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
|
|
|
|
|
|
/* Disable all the interrupts */
|
|
/* Disable all the interrupts */
|
|
ew32(IMC, 0xFFFFFFFF);
|
|
ew32(IMC, 0xFFFFFFFF);
|
|
- msleep(10);
|
|
|
|
|
|
+ usleep_range(10000, 20000);
|
|
|
|
|
|
/* Test each interrupt */
|
|
/* Test each interrupt */
|
|
for (i = 0; i < 10; i++) {
|
|
for (i = 0; i < 10; i++) {
|
|
@@ -984,7 +984,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
|
|
adapter->test_icr = 0;
|
|
adapter->test_icr = 0;
|
|
ew32(IMC, mask);
|
|
ew32(IMC, mask);
|
|
ew32(ICS, mask);
|
|
ew32(ICS, mask);
|
|
- msleep(10);
|
|
|
|
|
|
+ usleep_range(10000, 20000);
|
|
|
|
|
|
if (adapter->test_icr & mask) {
|
|
if (adapter->test_icr & mask) {
|
|
*data = 3;
|
|
*data = 3;
|
|
@@ -1002,7 +1002,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
|
|
adapter->test_icr = 0;
|
|
adapter->test_icr = 0;
|
|
ew32(IMS, mask);
|
|
ew32(IMS, mask);
|
|
ew32(ICS, mask);
|
|
ew32(ICS, mask);
|
|
- msleep(10);
|
|
|
|
|
|
+ usleep_range(10000, 20000);
|
|
|
|
|
|
if (!(adapter->test_icr & mask)) {
|
|
if (!(adapter->test_icr & mask)) {
|
|
*data = 4;
|
|
*data = 4;
|
|
@@ -1020,7 +1020,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
|
|
adapter->test_icr = 0;
|
|
adapter->test_icr = 0;
|
|
ew32(IMC, ~mask & 0x00007FFF);
|
|
ew32(IMC, ~mask & 0x00007FFF);
|
|
ew32(ICS, ~mask & 0x00007FFF);
|
|
ew32(ICS, ~mask & 0x00007FFF);
|
|
- msleep(10);
|
|
|
|
|
|
+ usleep_range(10000, 20000);
|
|
|
|
|
|
if (adapter->test_icr) {
|
|
if (adapter->test_icr) {
|
|
*data = 5;
|
|
*data = 5;
|
|
@@ -1031,7 +1031,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
|
|
|
|
|
|
/* Disable all the interrupts */
|
|
/* Disable all the interrupts */
|
|
ew32(IMC, 0xFFFFFFFF);
|
|
ew32(IMC, 0xFFFFFFFF);
|
|
- msleep(10);
|
|
|
|
|
|
+ usleep_range(10000, 20000);
|
|
|
|
|
|
/* Unhook test interrupt handler */
|
|
/* Unhook test interrupt handler */
|
|
free_irq(irq, netdev);
|
|
free_irq(irq, netdev);
|
|
@@ -1406,7 +1406,7 @@ static int e1000_set_82571_fiber_loopback(struct e1000_adapter *adapter)
|
|
*/
|
|
*/
|
|
#define E1000_SERDES_LB_ON 0x410
|
|
#define E1000_SERDES_LB_ON 0x410
|
|
ew32(SCTL, E1000_SERDES_LB_ON);
|
|
ew32(SCTL, E1000_SERDES_LB_ON);
|
|
- msleep(10);
|
|
|
|
|
|
+ usleep_range(10000, 20000);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -1501,7 +1501,7 @@ static void e1000_loopback_cleanup(struct e1000_adapter *adapter)
|
|
hw->phy.media_type == e1000_media_type_internal_serdes) {
|
|
hw->phy.media_type == e1000_media_type_internal_serdes) {
|
|
#define E1000_SERDES_LB_OFF 0x400
|
|
#define E1000_SERDES_LB_OFF 0x400
|
|
ew32(SCTL, E1000_SERDES_LB_OFF);
|
|
ew32(SCTL, E1000_SERDES_LB_OFF);
|
|
- msleep(10);
|
|
|
|
|
|
+ usleep_range(10000, 20000);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
/* Fall Through */
|
|
/* Fall Through */
|