diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2008-04-02 16:48:07 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-16 20:41:36 -0400 |
commit | 8d7c294cae6fd1474d88267810d1965f60a903af (patch) | |
tree | 2d9716923c2ef045ba4309530c6d510959254c17 /drivers/net | |
parent | 2723b019214c8787ee2fb54dacacfd112d2e5bf4 (diff) |
e1000e: limit EEPROM size accesses
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000e/82571.c | 4 | ||||
-rw-r--r-- | drivers/net/e1000e/es2lan.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index f7e1619b974e..9b46a00bb5f1 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c | |||
@@ -171,6 +171,10 @@ static s32 e1000_init_nvm_params_82571(struct e1000_hw *hw) | |||
171 | * for setting word_size. | 171 | * for setting word_size. |
172 | */ | 172 | */ |
173 | size += NVM_WORD_SIZE_BASE_SHIFT; | 173 | size += NVM_WORD_SIZE_BASE_SHIFT; |
174 | |||
175 | /* EEPROM access above 16k is unsupported */ | ||
176 | if (size > 14) | ||
177 | size = 14; | ||
174 | nvm->word_size = 1 << size; | 178 | nvm->word_size = 1 << size; |
175 | break; | 179 | break; |
176 | } | 180 | } |
diff --git a/drivers/net/e1000e/es2lan.c b/drivers/net/e1000e/es2lan.c index e3f4aeefeae2..2689e4b83f9b 100644 --- a/drivers/net/e1000e/es2lan.c +++ b/drivers/net/e1000e/es2lan.c | |||
@@ -178,6 +178,10 @@ static s32 e1000_init_nvm_params_80003es2lan(struct e1000_hw *hw) | |||
178 | * for setting word_size. | 178 | * for setting word_size. |
179 | */ | 179 | */ |
180 | size += NVM_WORD_SIZE_BASE_SHIFT; | 180 | size += NVM_WORD_SIZE_BASE_SHIFT; |
181 | |||
182 | /* EEPROM access above 16k is unsupported */ | ||
183 | if (size > 14) | ||
184 | size = 14; | ||
181 | nvm->word_size = 1 << size; | 185 | nvm->word_size = 1 << size; |
182 | 186 | ||
183 | return 0; | 187 | return 0; |