Skip to content

Commit

Permalink
e1000e: Set InterruptThrottleRate to default when invalid value used
Browse files Browse the repository at this point in the history
During module load, seting the InterruptThrottleRate parameter to an
invalid value would result in the itr/itr_setting pair being set to
unexpected values which would result in poor performance.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Bruce Allan authored and Jeff Garzik committed Aug 14, 2008
1 parent 56e1f82 commit 2d06cad
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions drivers/net/e1000e/param.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,26 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
e1000_validate_option(&adapter->itr, &opt,
adapter);
/*
* save the setting, because the dynamic bits
* change itr. clear the lower two bits
* because they are used as control
* Save the setting, because the dynamic bits
* change itr.
*/
adapter->itr_setting = adapter->itr & ~3;
if (e1000_validate_option(&adapter->itr, &opt,
adapter) &&
(adapter->itr == 3)) {
/*
* In case of invalid user value,
* default to conservative mode.
*/
adapter->itr_setting = adapter->itr;
adapter->itr = 20000;
} else {
/*
* Clear the lower two bits because
* they are used as control.
*/
adapter->itr_setting =
adapter->itr & ~3;
}
break;
}
} else {
Expand Down

0 comments on commit 2d06cad

Please sign in to comment.