diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-14 14:50:46 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-14 14:50:46 -0700 |
commit | b793b3a75e12ae4576f3d9b6013c8a7d8b0277b8 (patch) | |
tree | e493685833f06462afd5d4edc6e231c33131a633 /drivers/net/e1000e/param.c | |
parent | b635acec48bcaa9183fcbf4e3955616b0d4119b5 (diff) | |
parent | c0912585ec8b64d846d56995241f2c8a7f48ee75 (diff) | |
download | blackbird-op-linux-b793b3a75e12ae4576f3d9b6013c8a7d8b0277b8.tar.gz blackbird-op-linux-b793b3a75e12ae4576f3d9b6013c8a7d8b0277b8.zip |
Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
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) adapter->itr = 20000; break; default: - 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 { |