1. 01 Dec, 2016 36 commits
  2. 03 Nov, 2016 4 commits
    • Adam Wujek's avatar
      Merge branch 'sfp_diag' · dfcea15f
      Adam Wujek authored
      --Read DOM (Diagnostic Monitoring data) data from SFPs
      --Fix the write to SFPs eeprom
      --store DOM data in the HAL's shmem
      Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
      dfcea15f
    • Paul Boven's avatar
      userspace/libwr: Fixes to make shw_write_sfp() actually write SFP eeproms · 579646e4
      Paul Boven authored
      The SFP documentation "INF-8047.pdf" states:
      "The serial interface uses the 2-wire serial CMOS E2PROM protocol defined for
      the ATMEL AT24C01A/02/04 family of components."
      
      Upon reading that datasheet, some important details stand out:
      1) The eeprom can only write in pages, with pages being 8 or 16 bytes. Assuming
         the smallest device, you can only write 8 bytes at a time. To be safe, I'm
         assuming a pagesize of 8 bytes.
      
         This explains why we only saw stuff change in the first 8 bytes, I guess.
      
      2) A write needs to be preceded by the byte address which is a single byte for
         these devices, and then up to 8 (or 16) data bytes to be written at that
         location. If there are more bytes, or if the data wraps around the page
         binary, it will still only end up on the page belonging to that first
         address.
      
      3) After writing, you need to poll the eeprom to see if it has finished writing
         the byte. At the moment, I'm not doing that yet, instead I'm doing a 10ms
         wait which seems sufficient.
      Signed-off-by: Paul Boven's avatarPaul Boven <boven@jive.eu>
      Acked-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
      579646e4
    • Adam Wujek's avatar
      userspace/wrsw_hal: save Diagnostic Monitoring data from SFP in HAL · 3f05b29c
      Adam Wujek authored
      Kconfig:
      --add CONFIG_READ_SFP_DIAG_ENABLE
      libwr:
      --add the function shw_sfp_update_dom to update only needed values in the future
      --increase HAL_SHMEM_VERSION due to the changes in structures
      wrs_dump_shmem
      --add new fields
      HAL:
      --read DOM (Diagnostic Monitoring data) from SFP's eeprom at plug and once
        per second
      PPSI:
      --uplift hal shmem header
      wrs_sfp_dump:
      --support reading SFP's DOM from HAL
      Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
      3f05b29c
    • Adam Wujek's avatar
      userspace/libwr: read temperatures from SFPs · de57d4ae
      Adam Wujek authored
      Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
      de57d4ae