| To: | "jgarzik@xxxxxxxxx" <jgarzik@xxxxxxxxx> |
|---|---|
| Subject: | [PATCH 2.6 12/14] 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:22:05 -0800 (PST) |
| Cc: | netdev <netdev@xxxxxxxxxxx> |
| Replyto: | "Ganesh Venkatesan" <ganesh.venkatesan@intel.com> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@xxxxxxxxx>
diff -up net-drivers-2.6/drivers/net/e1000/e1000_hw.c
net-drivers-2.6/drivers/net/e1000.new/e1000_hw.c
--- net-drivers-2.6/drivers/net/e1000/e1000_hw.c 2004-12-03
07:24:37.090623184 -0800
+++ net-drivers-2.6/drivers/net/e1000.new/e1000_hw.c 2004-12-03
07:24:38.466414032 -0800
@@ -3504,7 +3504,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;
@@ -3652,7 +3652,7 @@ e1000_write_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;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2.6 11/14] 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.6 13/14] 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.6 11/14] 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.6 13/14] 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] |