]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc1d786c7d822c16cdee83f6d9fa9f5557cb8c441
tree25e410f113ab6c28bf7f2870232e983a934714d1
parentb3eb46c450cb13f102ab5b5d89bb645ffd05fa3b
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