| To: | "jgarzik@xxxxxxxxx" <jgarzik@xxxxxxxxx> |
|---|---|
| Subject: | [PATCH 2.4 11/13] e1000: Applied eeprom fix where it was possible to read/write one more word than what should have been possible |
| From: | Ganesh Venkatesan <ganesh.venkatesan@xxxxxxxxx> |
| Date: | Thu, 6 Jan 2005 17:20:24 -0800 (PST) |
| Cc: | netdev <netdev@xxxxxxxxxxx> |
| Replyto: | "Ganesh Venkatesan" <ganesh.venkatesan@xxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@xxxxxxxxx>
diff -up net-drivers-2.4/drivers/net/e1000/e1000_hw.c
net-drivers-2.4/drivers/net/e1000.new/e1000_hw.c
--- net-drivers-2.4/drivers/net/e1000/e1000_hw.c 2004-12-06
08:43:11.629382832 -0800
+++ net-drivers-2.4/drivers/net/e1000.new/e1000_hw.c 2004-12-06
08:43:12.460256520 -0800
@@ -3507,7 +3507,7 @@ e1000_read_eeprom(struct e1000_hw *hw,
/* A check for invalid values: offset too large, too many words, and not
* enough words.
*/
- if((offset > eeprom->word_size) || (words > eeprom->word_size - offset) ||
+ if((offset >= eeprom->word_size) || (words > eeprom->word_size - offset) ||
(words == 0)) {
DEBUGOUT("\"words\" parameter out of bounds\n");
return -E1000_ERR_EEPROM;
@@ -3653,11 +3653,10 @@ e1000_write_eeprom(struct e1000_hw *hw,
DEBUGFUNC("e1000_write_eeprom");
-
/* A check for invalid values: offset too large, too many words, and not
* enough words.
*/
- if((offset > eeprom->word_size) || (words > eeprom->word_size - offset) ||
+ if((offset >= eeprom->word_size) || (words > eeprom->word_size - offset) ||
(words == 0)) {
DEBUGOUT("\"words\" parameter out of bounds\n");
return -E1000_ERR_EEPROM;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2.4 10/13] e1000: Added workaround to prevent inadvertent gigabit waveform to be sent out on the wire due to init-time operations on the IGP phy, Ganesh Venkatesan |
|---|---|
| Next by Date: | [PATCH 2.4 12/13] e1000: Applied smart speed fix where the code was forcing smart speed on all the time. Now it will honor the setting defined in the eeprom, Ganesh Venkatesan |
| Previous by Thread: | [PATCH 2.4 10/13] e1000: Added workaround to prevent inadvertent gigabit waveform to be sent out on the wire due to init-time operations on the IGP phy, Ganesh Venkatesan |
| Next by Thread: | [PATCH 2.4 12/13] e1000: Applied smart speed fix where the code was forcing smart speed on all the time. Now it will honor the setting defined in the eeprom, Ganesh Venkatesan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |