be2net: Fix crash on 2nd invocation of PCI AER/EEH error_detected hook
authorSomnath Kotur <somnath.kotur@emulex.com>
Wed, 29 May 2013 22:56:17 +0000 (22:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 May 2013 23:58:06 +0000 (16:58 -0700)
commit01e5b2c4559d084f4eaf0d160d84cc185db141ba
treef6a76bf3fa3f5e39888f5cf960c884d970f6b84b
parente38b170695d4108eeb6cd84db36f567fc6de4120
be2net: Fix crash on 2nd invocation of PCI AER/EEH error_detected hook

During a PCI EEH/AER error recovery flow, if the device did not successfully
restart, the error_detected() hook may be called a second time with a
"perm_failure" state. This patch skips over driver cleanup for the second
invocation of the callback.

Also, Lancer error recovery code is fixed-up to handle these changes.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Somnath kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_main.c