aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hfi1/qsfp.h
diff options
context:
space:
mode:
authorEaswar Hariharan <easwar.hariharan@intel.com>2016-08-09 11:17:18 -0400
committerDoug Ledford <dledford@redhat.com>2016-08-22 14:31:41 -0400
commit140690eae7626a820ea135f33ff9fe11c1bcee6d (patch)
tree6f19d82c19de21a84867531c156dfd0cd3c686e8 /drivers/infiniband/hw/hfi1/qsfp.h
parentIB/hfi1,IB/qib: Fix qp_stats sleep with rcu read lock held (diff)
downloadlinux-dev-140690eae7626a820ea135f33ff9fe11c1bcee6d.tar.xz
linux-dev-140690eae7626a820ea135f33ff9fe11c1bcee6d.zip
IB/hfi1: Fetch monitor values on-demand for CableInfo query
The monitor values from bytes 22 through 81 of the QSFP memory space (SFF 8636) are dynamic and serving them out of the QSFP memory cache maintained by the driver provides stale data to the CableInfo SMA query. This patch refreshes the dynamic values from the QSFP memory on request and overwrites the stale data from the cache for the overlap between the requested range and the monitor range. Reviewed-by: Jubin John <jubin.john@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/qsfp.h')
-rw-r--r--drivers/infiniband/hw/hfi1/qsfp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/qsfp.h b/drivers/infiniband/hw/hfi1/qsfp.h
index 69275ebd9597..36cf52359848 100644
--- a/drivers/infiniband/hw/hfi1/qsfp.h
+++ b/drivers/infiniband/hw/hfi1/qsfp.h
@@ -74,6 +74,9 @@
/* Defined fields that Intel requires of qualified cables */
/* Byte 0 is Identifier, not checked */
/* Byte 1 is reserved "status MSB" */
+#define QSFP_MONITOR_VAL_START 22
+#define QSFP_MONITOR_VAL_END 81
+#define QSFP_MONITOR_RANGE (QSFP_MONITOR_VAL_END - QSFP_MONITOR_VAL_START + 1)
#define QSFP_TX_CTRL_BYTE_OFFS 86
#define QSFP_PWR_CTRL_BYTE_OFFS 93
#define QSFP_CDR_CTRL_BYTE_OFFS 98