mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
ixgbevf: fix possible divide by zero in ixgbevf_update_itr
The next call to ixgbevf_update_itr will continue to dynamically
update ITR.
Copy from commit bdbeefe8ea ("ixgbe: fix possible divide by zero in
ixgbe_update_itr")
Signed-off-by: Young Xiao <92siuyang@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
655c914145
commit
e0f0be7dee
1 changed files with 3 additions and 0 deletions
|
|
@ -1423,6 +1423,9 @@ static void ixgbevf_update_itr(struct ixgbevf_q_vector *q_vector,
|
|||
*/
|
||||
/* what was last interrupt timeslice? */
|
||||
timepassed_us = q_vector->itr >> 2;
|
||||
if (timepassed_us == 0)
|
||||
return;
|
||||
|
||||
bytes_perint = bytes / timepassed_us; /* bytes/usec */
|
||||
|
||||
switch (itr_setting) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue