IB/hfi1: Harden state transition to Armed and Active
authorAlex Estrin <alex.estrin@intel.com>
Sat, 29 Jul 2017 15:43:20 +0000 (08:43 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 31 Jul 2017 19:18:37 +0000 (15:18 -0400)
commit5efd40cad4bf98f0d1f6b726d67e39decd85edc9
treeddcd4af0836f6a0332d719aa9adc240fca7b5cfc
parentf13a6e5e2e0192737c3bdbdb16c5cc0181cc86e5
IB/hfi1: Harden state transition to Armed and Active

There is a window that allows other threads to read state of
'host_link_state' as a new, before the hardware actual state is set.
This patch closes the window by indicating a new state only after
hardware transition is complete.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Alex Estrin <alex.estrin@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