e1000: Fix a bug in e1000_probe()
There are several reasons why that code in e1000_probe had to be
changed:

 - It reads from chip variant specific register (present only on
   i210) in a chip variant agnostic codepath

 - It makes no sense to check for FLUPD bit to make a decision weither
   to validate EEPROM or not since its function per datasheet is:

   " ... Flash Update.

     Writing 1b to this bit causes the content of the internal 4 KB
     shadow RAM to be written into one of the first two 4 KB sectors
     of the Flash device (Sector 0 or Sector 1). The bit is
     self-cleared immediately... "

   and it is only through sheer serendipity the defined value for
   bitmask for FLUPD is equivalent to bitmask for FLASH_DETECTED bit
   which is the bit we actually care about and need to test against
   (FLUPD for i210 has a different bitmask)

Fix those problems by replacing the i210 specific check inside of
e1000_validate_eeprom_checksum() with a chip agnostic one and using
correct bitmask.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent e1e4976 commit 224174354f782863d04be025f1a5df683041e370
@Andrey Smirnov Andrey Smirnov authored on 2 Jun 2016
Sascha Hauer committed on 3 Jun 2016
Showing 3 changed files
View
drivers/net/e1000/e1000.h
View
drivers/net/e1000/eeprom.c
View
drivers/net/e1000/main.c