diff options
Diffstat (limited to 'drivers/net/e1000e/param.c')
-rw-r--r-- | drivers/net/e1000e/param.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c index 8effc3107f9a..ed912e023a72 100644 --- a/drivers/net/e1000e/param.c +++ b/drivers/net/e1000e/param.c | |||
@@ -324,14 +324,27 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
324 | adapter->itr = 20000; | 324 | adapter->itr = 20000; |
325 | break; | 325 | break; |
326 | default: | 326 | default: |
327 | e1000_validate_option(&adapter->itr, &opt, | ||
328 | adapter); | ||
329 | /* | 327 | /* |
330 | * save the setting, because the dynamic bits | 328 | * Save the setting, because the dynamic bits |
331 | * change itr. clear the lower two bits | 329 | * change itr. |
332 | * because they are used as control | ||
333 | */ | 330 | */ |
334 | adapter->itr_setting = adapter->itr & ~3; | 331 | if (e1000_validate_option(&adapter->itr, &opt, |
332 | adapter) && | ||
333 | (adapter->itr == 3)) { | ||
334 | /* | ||
335 | * In case of invalid user value, | ||
336 | * default to conservative mode. | ||
337 | */ | ||
338 | adapter->itr_setting = adapter->itr; | ||
339 | adapter->itr = 20000; | ||
340 | } else { | ||
341 | /* | ||
342 | * Clear the lower two bits because | ||
343 | * they are used as control. | ||
344 | */ | ||
345 | adapter->itr_setting = | ||
346 | adapter->itr & ~3; | ||
347 | } | ||
335 | break; | 348 | break; |
336 | } | 349 | } |
337 | } else { | 350 | } else { |