mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 10:01:41 +00:00
be2net: Fix interval calculation in interrupt moderation
Interrupt moderation parameters need to be recalculated only after a time interval of 1 ms. Interval calculation is wrong when there is a rollover of jiffies. Using recommended way of interval calculation using jiffies to fix this. Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@broadcom.com> Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
972f37b424
commit
3c0d49aaa6
@ -1917,8 +1917,7 @@ static u32 be_get_eq_delay_mult_enc(struct be_eq_obj *eqo)
|
||||
if (!aic->enable)
|
||||
return 0;
|
||||
|
||||
if (time_before_eq(now, aic->jiffies) ||
|
||||
jiffies_to_msecs(now - aic->jiffies) < 1)
|
||||
if (jiffies_to_msecs(now - aic->jiffies) < 1)
|
||||
eqd = aic->prev_eqd;
|
||||
else
|
||||
eqd = be_get_new_eqd(eqo);
|
||||
|
Loading…
Reference in New Issue
Block a user