diff options
author | Kamil Krawczyk <kamil.krawczyk@intel.com> | 2014-10-25 03:24:30 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-11-11 05:44:16 -0800 |
commit | 0db4e162e6617ed0d0cb34756b86ab3dc6ad4fbf (patch) | |
tree | 18ef1dd45eb659ec0b0b282e958fbfa7ebe5ad6a /drivers/net/ethernet/intel/i40e/i40e_adminq.c | |
parent | 2e1af7d74f4f7b4d4c1b0fbf5da3b5f92d9c332f (diff) | |
download | linux-0db4e162e6617ed0d0cb34756b86ab3dc6ad4fbf.tar.gz linux-0db4e162e6617ed0d0cb34756b86ab3dc6ad4fbf.tar.bz2 linux-0db4e162e6617ed0d0cb34756b86ab3dc6ad4fbf.zip |
i40e: poll firmware slower
The code was polling the firmware tail register for completion every
10 microseconds, which is way faster than the firmware can respond.
This changes the poll interval to 1ms, which reduces polling CPU
utilization, and the number of times we loop.
The maximum delay is still 100ms.
Change-ID: I4bbfa6b66d802890baf8b4154061e55942b90958
Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@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/i40e/i40e_adminq.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_adminq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c index 72f5d25a222f..f7f6206368df 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c @@ -853,7 +853,6 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw, */ if (!details->async && !details->postpone) { u32 total_delay = 0; - u32 delay_len = 10; do { /* AQ designers suggest use of head for better @@ -861,9 +860,8 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw, */ if (i40e_asq_done(hw)) break; - /* ugh! delay while spin_lock */ - udelay(delay_len); - total_delay += delay_len; + usleep_range(1000, 2000); + total_delay++; } while (total_delay < hw->aq.asq_cmd_timeout); } |