1. 22 7月, 2019 1 次提交
    • A
      net: phy: sfp: hwmon: Fix scaling of RX power · 0cea0e11
      Andrew Lunn 提交于
      The RX power read from the SFP uses units of 0.1uW. This must be
      scaled to units of uW for HWMON. This requires a divide by 10, not the
      current 100.
      
      With this change in place, sensors(1) and ethtool -m agree:
      
      sff2-isa-0000
      Adapter: ISA adapter
      in0:          +3.23 V
      temp1:        +33.1 C
      power1:      270.00 uW
      power2:      200.00 uW
      curr1:        +0.01 A
      
              Laser output power                        : 0.2743 mW / -5.62 dBm
              Receiver signal average optical power     : 0.2014 mW / -6.96 dBm
      
      Reported-by: chris.healy@zii.aero
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Fixes: 1323061a ("net: phy: sfp: Add HWMON support for module sensors")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0cea0e11
  2. 13 7月, 2019 1 次提交
  3. 09 7月, 2019 1 次提交
  4. 16 6月, 2019 2 次提交
  5. 15 6月, 2019 2 次提交
  6. 10 6月, 2019 4 次提交
  7. 07 6月, 2019 1 次提交
  8. 06 6月, 2019 1 次提交
  9. 05 6月, 2019 1 次提交
  10. 04 6月, 2019 1 次提交
    • R
      net: sfp: read eeprom in maximum 16 byte increments · 28e74a7c
      Russell King 提交于
      Some SFP modules do not like reads longer than 16 bytes, so read the
      EEPROM in chunks of 16 bytes at a time.  This behaviour is not specified
      in the SFP MSAs, which specifies:
      
       "The serial interface uses the 2-wire serial CMOS E2PROM protocol
        defined for the ATMEL AT24C01A/02/04 family of components."
      
      and
      
       "As long as the SFP+ receives an acknowledge, it shall serially clock
        out sequential data words. The sequence is terminated when the host
        responds with a NACK and a STOP instead of an acknowledge."
      
      We must avoid breaking a read across a 16-bit quantity in the diagnostic
      page, thankfully all 16-bit quantities in that page are naturally
      aligned.
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28e74a7c
  11. 01 6月, 2019 5 次提交
  12. 31 5月, 2019 4 次提交
  13. 30 5月, 2019 15 次提交
  14. 27 5月, 2019 1 次提交