public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] igb: restore EEPROM 16kB access limit
@ 2011-04-08 13:34 Stefan Assmann
  2011-04-08 16:40 ` Wyborny, Carolyn
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Assmann @ 2011-04-08 13:34 UTC (permalink / raw)
  To: netdev; +Cc: e1000-devel, john.ronciak

The check limiting the EEPROM access up to 16kB was removed by
commit 4322e561a93ec7ee034b603a6c610e7be90d4e8a. Without this check
the kernel will try to checksum the EEPROM up to 2MB (observed with
a 8086:10c9 NIC) and fail.

igb 0000:03:00.0: 0 vfs allocated
igb 0000:03:00.0: The NVM Checksum Is Not Valid
ACPI: PCI interrupt for device 0000:03:00.0 disabled
igb: probe of 0000:03:00.0 failed with error -5

Reason for that being an overflow in u16 e1000_nvm_info->nvm
while doing "nvm->word_size = 1 << size;" with size == 21.
Putting the check back in place.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
 drivers/net/igb/e1000_82575.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
index 6b256c2..5cfa37f 100644
--- a/drivers/net/igb/e1000_82575.c
+++ b/drivers/net/igb/e1000_82575.c
@@ -244,6 +244,10 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
 	 */
 	size += NVM_WORD_SIZE_BASE_SHIFT;
 
+	/* EEPROM access above 16k is unsupported */
+	if (size > 14)
+		size = 14;
+
 	nvm->word_size = 1 << size;
 	if (nvm->word_size == (1 << 15))
 		nvm->page_size = 128;
-- 
1.7.4


------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-04-27 15:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 13:34 [PATCH] igb: restore EEPROM 16kB access limit Stefan Assmann
2011-04-08 16:40 ` Wyborny, Carolyn
2011-04-08 20:04   ` Stefan Assmann
2011-04-08 20:10     ` Wyborny, Carolyn
2011-04-26 15:06       ` Andy Gospodarek
2011-04-26 15:12         ` Wyborny, Carolyn
2011-04-27 14:15           ` Andy Gospodarek
2011-04-27 15:01             ` Wyborny, Carolyn
2011-04-26 15:07       ` Stefan Assmann
2011-04-26 15:10         ` Wyborny, Carolyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox