IB/hfi1: Fix infinite loop in 8051 command error path
authorSebastian Sanchez <sebastian.sanchez@intel.com>
Tue, 19 Dec 2017 03:56:59 +0000 (19:56 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 5 Jan 2018 18:34:55 +0000 (13:34 -0500)
commit9996b049f64125dbf05916e80a06546e92185f9f
tree94f9bf06dab280c0c99ae289edd0893cc4788183
parentf5b53b043470b28b60a9c50317e3f777a872b77c
IB/hfi1: Fix infinite loop in 8051 command error path

When an 8051 command times out, the entire DC block is restarted. During
the restart, the host interface version bit is set, which calls
do_8051_command() recursively. The host version bit needs to be set
before the link moves into polling, so the host version bit can be set
in set_local_link_attributes() instead. Thus, the 8051 command functions
can be simplied as a non-locking version (dd->dc8051_lock) of those
functions are no longer needed.

Fixes: 9be6a5d788b0 ("IB/hfi1: Prevent LNI out of sync by resetting host interface version")
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/chip.c
drivers/infiniband/hw/hfi1/chip.h
drivers/infiniband/hw/hfi1/firmware.c