]> git.baikalelectronics.ru Git - kernel.git/commit
be2net: Fix to reap TX compls till HW doesn't respond for some time
authorVasundhara Volam <vasundhara.volam@emulex.com>
Mon, 14 Apr 2014 10:42:40 +0000 (16:12 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Apr 2014 17:41:37 +0000 (13:41 -0400)
commit1e95ffd1efaa26bbab38f16b234ab78be8bc9773
tree2fba736b42cf43321f3e2db63fe1e7fd7a454ba2
parenta3b76956d03b6de71cbe2be6c3c3abda21d8bf96
be2net: Fix to reap TX compls till HW doesn't respond for some time

be_close() currently waits for a max of 200ms to receive all pending
TX compls. This timeout value was roughly calculated based on 10G
transmission speeds and the TX queue depth. This timeout may not be
enough when the link is operating at lower speeds or in multi-channel/SR-IOV
configs with TX-rate limiting setting.

It is hard to calculate a "proper timeout value" that works in all
configurations.  This patch solves this problem by continuing to reap
TX completions till the HW is completely silent for a period of 10ms or
a HW error is detected.

v2: implements the new scheme (as suggested by David Laight) instead of
just waiting longer than 200ms for reaping all completions.

Signed-off-by: Vasundhara Volam <vasundhara.volam@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