1. 01 Dec, 2016 38 commits
  2. 03 Nov, 2016 2 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