net/sfc/base: avoid division by 0 if no event queue timers
authorAndrew Rybchenko <arybchenko@solarflare.com>
Thu, 7 Feb 2019 16:29:41 +0000 (16:29 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Feb 2019 10:35:41 +0000 (11:35 +0100)
commit40d2864c8ae4db307b9d6c3482af1f4e349e3cb7
treed1149e1425e9ec633a4698c0d36fcf870264702b
parent5661516f2262bf2e53174f93ee911a77b96aa031
net/sfc/base: avoid division by 0 if no event queue timers

If event queue timers are not supported, enc_evq_timer_quantum_ns and
enc_evq_timer_max_us should be set to 0. Make sure that division by 0
does not happen in libefx, if public function efx_ev_usecs_to_ticks()
is used in this case.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/base/efx_ev.c