net/fm10k/base: do not stop reset
authorQi Zhang <qi.z.zhang@intel.com>
Wed, 8 Mar 2017 06:19:01 +0000 (01:19 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 13:52:52 +0000 (15:52 +0200)
commit52f962141bbe2d57d7a77f7808e112a6514ae50b
tree62fb8ab32d79c8837acf004bed11576f12bd4f91
parente9861ae847277b3cf83725eb7a07c2f6efbd196c
net/fm10k/base: do not stop reset

Don't report FM10K_ERR_REQUESTS_PENDING when we fail to disable queues
within the timeout. This can occur due to a hardware Tx hang, or when
the switch ethernet fabric is resetting while we are transmitting
traffic. It can sometimes take up to 500ms before the Tx DMA engine
gives up. Instead, just skip the DMA engine check and perform
a data-path reset anyways. Add a statistic counter to keep track of the
number of resets occurring while we have pending DMA on the rings.

In order to prevent having to assign err = FM10K_SUCCESS, re-order the
last few items of the reset_hw_pf function so that we don't perform
"return err" at the end.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/fm10k/base/fm10k_pf.c
drivers/net/fm10k/base/fm10k_type.h
drivers/net/fm10k/base/fm10k_vf.c