be2net: refactor error detect/recovery function
authorKalesh AP <kalesh.purayil@emulex.com>
Mon, 23 Feb 2015 09:20:12 +0000 (04:20 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Feb 2015 20:08:32 +0000 (15:08 -0500)
commitd0e1b319bbf345e8b8cc8bd7702cc6c33db074d9
tree25e410f113ab6c28bf7f2870232e983a934714d1
parenteb7dd46c634fa5b2f2039791bd2e79343318d6e5
be2net: refactor error detect/recovery function

Currently when an error is detected, the queue resources are being cleaned up
in the recovery routine. The resources are better cleaned up in the error
detection routine itself (similar to EEH code.)
So, this patch re-factors error processing logic to follow the following sequence:
- check if there is an error in adapter
- if error,
- cleanup resources
- attempt recovery

The patch renames lancer_recover_func() to be_err_recover() as this
routine will be used in the future for error recovery on Skyhawk too.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_main.c