Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d06cad1 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Garzik
Browse files

e1000e: Set InterruptThrottleRate to default when invalid value used



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: default avatarBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 56e1f829
Loading
Loading
Loading
Loading
+19 −4
Original line number Original line Diff line number Diff line
@@ -327,11 +327,26 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
				e1000_validate_option(&adapter->itr, &opt,
				e1000_validate_option(&adapter->itr, &opt,
					adapter);
					adapter);
				/*
				/*
				 * save the setting, because the dynamic bits
				 * Save the setting, because the dynamic bits
				 * change itr. clear the lower two bits
				 * change itr.
				 * because they are used as control
				 */
				 */
				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;
				break;
			}
			}
		} else {
		} else {