e1000: prevent corruption of EEPROM/NVM
authorChristopher Li <chrisl@vmware.com>
Fri, 5 Sep 2008 21:04:05 +0000 (14:04 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 19 Sep 2008 01:40:24 +0000 (21:40 -0400)
commit78566fecbb12a7616ae9a88b2ffbc8062c4a89e3
tree732e81889c6be0780ac196163a5c7c29f2dc490e
parentf55c21fd9a92a444e55ad1ca4e4732d56661bf2e
e1000: prevent corruption of EEPROM/NVM

Andrey reports e1000 corruption, and that a patch in vmware's ESX fixed
it.

The EEPROM corruption is triggered by concurrent access of the EEPROM
read/write. Putting a lock around it solve the problem.

[akpm@linux-foundation.org: use DEFINE_SPINLOCK to avoid confusing lockdep]
Signed-off-by: Christopher Li <chrisl@vmware.com>
Reported-by: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Zach Amsden <zach@vmware.com>
Cc: Pratap Subrahmanyam <pratap@vmware.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Bruce Allan <bruce.w.allan@intel.com>
Cc: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Cc: John Ronciak <john.ronciak@intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/e1000/e1000_hw.c