]> git.baikalelectronics.ru Git - kernel.git/commit
e1000e: check return code from NVM accesses and fix bank detection
authorBruce Allan <bruce.w.allan@intel.com>
Sat, 22 Nov 2008 01:02:41 +0000 (17:02 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 22 Nov 2008 01:02:41 +0000 (17:02 -0800)
commit83e497c9cc2814a019f7d89aa4dc6d1f5670ebfc
tree7246784e849ca0471a4bf2bc69a960d6194a6af9
parentc32dc086db3006994b4a9bdf2d9fbce7e9f345d2
e1000e: check return code from NVM accesses and fix bank detection

Check return code for all NVM accesses[1] and error out accordingly; log
a debug message for failed accesses.

For ICH8/9, the valid NVM bank detect function was not checking whether the
SEC1VAL (sector 1 valid) bit in the EECD register was itself valid (bits 8
and 9 also have to be set).  If invalid, it would have defaulted to the
possibly invalid bank 0.  Instead, try to use the valid bank detection
method used by ICH10 which has been cleaned up a bit.

[1] - reads and updates only; not writes because those are only writing to
the Shadow RAM, the update following the write is the only thing actually
writing the modified Shadow RAM contents to the NVM.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e1000e/82571.c
drivers/net/e1000e/defines.h
drivers/net/e1000e/ethtool.c
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/netdev.c