IB/hfi1: Prevent LNI out of sync by resetting host interface version
authorSebastian Sanchez <sebastian.sanchez@intel.com>
Mon, 2 Oct 2017 18:04:26 +0000 (11:04 -0700)
committerDoug Ledford <dledford@redhat.com>
Wed, 4 Oct 2017 19:39:45 +0000 (15:39 -0400)
commit9be6a5d788b0f236e3b30827187e5db33231fa74
tree8550683b40bb201366790d1cd611608313301f30
parentd7d626179fb283aba73699071af0df6d00e32138
IB/hfi1: Prevent LNI out of sync by resetting host interface version

When the link is disabled and re-enabled, the host version bit is not
set again, so the firmware behaves as though it’s interacting with an
old driver. This causes LNI to get out of sync. The host version bit
needs to be set at load_8051_firmware() and _dc_start(). Currently, it's
only set at load_8051_firmware().

Create a common function to set the bit with the intent to make the code
more maintainable in the future, set the host version bit at _dc_start()
and modify the 8051 command API to prevent a deadlock as _dc_start() is
already holding the dc8051 lock.

Fixes: 913cc67159bc ("IB/hfi1: Always perform offline transition")
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@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