netxen: fix failure cases for fw hang recovery
authorAmit Kumar Salecha <amit@unm84.unmin.com>
Wed, 2 Dec 2009 15:46:19 +0000 (15:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Dec 2009 03:57:18 +0000 (19:57 -0800)
commit8f9b3f69944ab7eacb9273b4723087c42b5f4046
treeb824149cb41ac31a5532e140e06c2dd77a266793
parentf58dbd7320e148b25cc0088ef37f524c99c6790f
netxen: fix failure cases for fw hang recovery

Handle few corner cases in firmware hang detection and recovery:

o Don't mark device state as READY, till handshake with
  firmware is done.
o During probe, if start_firmware fails, restore reference
  count.
o Don't increment refernce count, if start_firmware fails
  during firmware reset.
o Clear __NX_RESETTING bit, incase of fatal error or tempeature
  reaches critical limit so that pci remove() doesn't poll on
  this bit.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netxen/netxen_nic_main.c