]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit32cefac0df82ace8966809df5ca82d018ba29a16
tree94f9bf06dab280c0c99ae289edd0893cc4788183
parent45161fb5e7dba3bb9c3047bb8037573441c448b5
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: 713c11ee34ff ("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