wrs_sfp_dump returns "unable to read consistent data from HAL's shmem"
As reported by peterj on https://forums.ohwr.org/t/wrs-sfp-dump-returns-unable-to-read-consistent-data-from-hals-shmem/848228:
"An SFP inquiry on a single port (wrs-# wrs_sfp_dump -L -p 01) frequently ends in “Unable to read consistent data from HAL’s shmem!”. This happens when operating the switch (V5.01) with SFP Diagnostics enabled (i.e. /wr/etc/dot-config => CONFIG_READ_SFP_DIAG_ENABLE=y) and having plugged many Digital Diagnostics Monitoring (SFF-8472) SFF-8472 compliant SFPs.
Some further analysis: By probing the IC2 lines with an oscilloscope, It has been observed that a monitoring sequence is done each second. With no SFPs pulged, scanning the I2C bus takes ~13 ms and for each SFP that is SFF-8472 compliant, an I2C sequence of ~38 ms is added. This adds up to 13 + 18 * 38 ms = ~700 ms for a fully loaded switch. This may explain why the issue appears more often when many SFPs are plugged.
Question 1: Is “Unable to read consistent data from HAL’s shmem!” due to a clash on the I2C bus? Question 2: If so, is there a bus arbitration problem that needs to be solved? Question 3: To my opinion the monitoring rate is quite high (once a second). The chances of a I2c clash (if any) is lowered when the rate is adjusted to once in 10 or even 60 seconds. Can this be done?"