summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hfi1/driver.c
diff options
context:
space:
mode:
authorByczkowski, Jakub <jakub.byczkowski@intel.com>2017-05-30 03:21:32 +0300
committerDoug Ledford <dledford@redhat.com>2017-06-27 23:58:12 +0300
commitbec7c79cd8f764ba84c8ec6d8c402b8a7cd3a54f (patch)
tree5de07092e15fa5ea1c7a9c87b54416db7dd89c5c /drivers/infiniband/hw/hfi1/driver.c
parentd54389836ac63cb517bf863b9f6c22626c6aec26 (diff)
downloadlinux-bec7c79cd8f764ba84c8ec6d8c402b8a7cd3a54f.tar.xz
IB/hfi1: Modify handling of physical link state by Host Driver
Ensure states returned to the Fabric Manager are consistent with the OPA specification by caching the physical state along with the logical state. Reviewed-by: Stuart Summers <john.s.summers@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Andrzej Kotlowski <andrzej.kotlowski@intel.com> Signed-off-by: Jakub Byczkowski <jakub.byczkowski@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/driver.c')
-rw-r--r--drivers/infiniband/hw/hfi1/driver.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c
index 9e59430bc55c..e64e9e28c936 100644
--- a/drivers/infiniband/hw/hfi1/driver.c
+++ b/drivers/infiniband/hw/hfi1/driver.c
@@ -906,10 +906,12 @@ static inline int set_armed_to_active(struct hfi1_ctxtdata *rcd,
sc = hfi1_9B_get_sc5(hdr, packet->rhf);
}
if (sc != SC15_PACKET) {
- int hwstate = read_logical_state(dd);
+ int hwstate = driver_lstate(rcd->ppd);
- if (hwstate != LSTATE_ACTIVE) {
- dd_dev_info(dd, "Unexpected link state %d\n", hwstate);
+ if (hwstate != IB_PORT_ACTIVE) {
+ dd_dev_info(dd,
+ "Unexpected link state %s\n",
+ opa_lstate_name(hwstate));
return 0;
}