IB/hfi1: Prohibit invalid Init to Armed state transition
authorGrzegorz Morys <grzegorz.morys@intel.com>
Mon, 6 Nov 2017 14:38:59 +0000 (06:38 -0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 13 Nov 2017 20:53:57 +0000 (15:53 -0500)
commita276672ed71eb247ef3b728e35a37bacb7749213
treed4d6b69ba439ddaebc026233e53bcec389d32847
parentcc9a97ea2c74e8270f3d77d1fd4711c6fc866d7f
IB/hfi1: Prohibit invalid Init to Armed state transition

It is invalid to change Link state from Init to Armed if
IsSmConfigurationStarted bit is not set in Attribute modifier
for Set subnet management method in case of PortInfo
and PortStateInfo attribute.
Set response MAD status field bits accordingly to react correctly
in such situations and avoid changing Link state.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Grzegorz Morys <grzegorz.morys@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/mad.c