projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01f27fc
)
ixgbe: fix possible divide by zero in ixgbe_update_itr
author
Don Skidmore
<
[email protected]
>
Sat, 2 Mar 2013 07:17:37 +0000
(07:17 +0000)
committer
Jeff Kirsher
<
[email protected]
>
Thu, 25 Apr 2013 00:29:02 +0000
(17:29 -0700)
Protect the code by bailing out of ixgbe_update_itr() when this occurs.
The next call to ixgbe_update_itr will continue to dynamically update ITR.
Signed-of-by: Don Skidmore <
[email protected]
>
Tested-by: Phil Schmitt <
[email protected]
>
Signed-off-by: Jeff Kirsher <
[email protected]
>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 6225f880a3f455a342a1abe0dc9a76bf15b8a737..9afc959c1499891dffaa40dd19b56885e490ffbf 100644
(file)
--- a/
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@
-2095,6
+2095,9
@@
static void ixgbe_update_itr(struct ixgbe_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) {