i40iw: Improve CQP timeout logic
authorShiraz Saleem <shiraz.saleem@intel.com>
Wed, 9 Aug 2017 01:38:45 +0000 (20:38 -0500)
committerDoug Ledford <dledford@redhat.com>
Tue, 22 Aug 2017 19:38:27 +0000 (15:38 -0400)
commitd26875b43d45644e87f4c0b6bb2d7abf3c61d529
tree47b1dbbe4234afb5e2f458f9d8d63b7ebee614b1
parentbf808b5039c66f9843cdc30f18c0608dbbf11374
i40iw: Improve CQP timeout logic

The current timeout logic for Control Queue-Pair (CQP) OPs
does not take into account whether CQP makes progress but
rather blindly waits for a large timeout value, 100000 jiffies
for the completion event. Improve this by setting the timeout
based on whether the CQP is making progress or not. If the CQP
is hung, the timeout will happen sooner, in 5000 jiffies. Each
time the CQP progress is detetcted, the timeout extends by 5000
jiffies.

Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Christopher N Bednarz <christopher.n.bednarz@intel.com>
Signed-off-by: Henry Orosco <henry.orosco@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_ctrl.c
drivers/infiniband/hw/i40iw/i40iw_p.h
drivers/infiniband/hw/i40iw/i40iw_type.h
drivers/infiniband/hw/i40iw/i40iw_utils.c