aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40evf/i40evf_main.c
diff options
context:
space:
mode:
authorNeerav Parikh <neerav.parikh@intel.com>2014-09-13 03:40:44 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-10-23 23:38:03 -0400
commitf98a20068dfcc16d1292d3e4d0d690e123da1538 (patch)
treeb55ac83c349eecd0bad3688441e708e16e0870d8 /drivers/net/ethernet/intel/i40evf/i40evf_main.c
parent8c570dcc8cbabd7bf1a8eb7eb7cc16a1a37b6c0f (diff)
i40e/i40evf: Use usleep_range() instead of udelay()
As per the Documentation/timers/timers-howto.txt it is preferred to use usleep_range() instead of udelay() if the delay value is > 10us in non-atomic contexts. So, replacing all the instances of udelay() with 10 or greater than 10 micro seconds delay in the driver and using usleep_range() instead. Change-ID: Iaa2ab499a4c26f6005e5d86cc421407ef9de16c7 Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Neerav Parikh <neerav.parikh@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf/i40evf_main.c')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index c51bc7a33bc5..dabe6a4220c6 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1494,7 +1494,7 @@ static void i40evf_reset_task(struct work_struct *work)
1494 1494
1495 while (test_and_set_bit(__I40EVF_IN_CRITICAL_TASK, 1495 while (test_and_set_bit(__I40EVF_IN_CRITICAL_TASK,
1496 &adapter->crit_section)) 1496 &adapter->crit_section))
1497 udelay(500); 1497 usleep_range(500, 1000);
1498 1498
1499 if (adapter->flags & I40EVF_FLAG_RESET_NEEDED) { 1499 if (adapter->flags & I40EVF_FLAG_RESET_NEEDED) {
1500 dev_info(&adapter->pdev->dev, "Requesting reset from PF\n"); 1500 dev_info(&adapter->pdev->dev, "Requesting reset from PF\n");
@@ -1980,7 +1980,7 @@ static int i40evf_check_reset_complete(struct i40e_hw *hw)
1980 if ((rstat == I40E_VFR_VFACTIVE) || 1980 if ((rstat == I40E_VFR_VFACTIVE) ||
1981 (rstat == I40E_VFR_COMPLETED)) 1981 (rstat == I40E_VFR_COMPLETED))
1982 return 0; 1982 return 0;
1983 udelay(10); 1983 usleep_range(10, 20);
1984 } 1984 }
1985 return -EBUSY; 1985 return -EBUSY;
1986} 1986}