IB/hfi1: Fetch monitor values on-demand for CableInfo query
authorEaswar Hariharan <easwar.hariharan@intel.com>
Tue, 9 Aug 2016 15:17:18 +0000 (11:17 -0400)
committerDoug Ledford <dledford@redhat.com>
Mon, 22 Aug 2016 18:31:41 +0000 (14:31 -0400)
commit140690eae7626a820ea135f33ff9fe11c1bcee6d
tree6f19d82c19de21a84867531c156dfd0cd3c686e8
parentc62fb260a86dde3df5b2905432caa0e9f6898434
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>
drivers/infiniband/hw/hfi1/qsfp.c
drivers/infiniband/hw/hfi1/qsfp.h