• Vasundhara Volam's avatar
    be2net: Fix to reap TX compls till HW doesn't respond for some time · 1a3d0717
    Vasundhara Volam authored
    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: default avatarVasundhara Volam <vasundhara.volam@emulex.com>
    Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1a3d0717
be_main.c 128 KB