summaryrefslogtreecommitdiffstats
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2016-05-06 21:41:51 +0200
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-06-29 10:00:22 -0700
commit3d05b15b03daa4e8c350a97d0d83d2c2abc8b8ef (patch)
tree783ff35f81d62549a685ab3715002c3def50c205 /scripts/objdiff
parent34875887f360d7bd0b7f0a89f7c6d65eca616ee3 (diff)
downloadcachepc-linux-3d05b15b03daa4e8c350a97d0d83d2c2abc8b8ef.tar.gz
cachepc-linux-3d05b15b03daa4e8c350a97d0d83d2c2abc8b8ef.zip
e1000e: prevent division by zero if TIMINCA is zero
Users report that under VMWare, er32(TIMINCA) returns zero. This causes division by zero at init time as follows: ==> incvalue = er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK; for (i = 0; i < E1000_MAX_82574_SYSTIM_REREADS; i++) { /* latch SYSTIMH on read of SYSTIML */ systim_next = (cycle_t)er32(SYSTIML); systim_next |= (cycle_t)er32(SYSTIMH) << 32; time_delta = systim_next - systim; temp = time_delta; ====> rem = do_div(temp, incvalue); This change makes kernel survive this, and users report that NIC does work after this change. Since on real hardware incvalue is never zero, this should not affect real hardware use case. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions