• Antoine Tenart's avatar
    net: phy: sfp: fix the BR,min computation · 52c5cd1b
    Antoine Tenart authored
    In an SFP EEPROM values can be read to get information about a given SFP
    module. One of those is the bitrate, which can be determined using a
    nominal bitrate in addition with min and max values (in %). The SFP code
    currently compute both BR,min and BR,max values thanks to this nominal
    and min,max values.
    
    This patch fixes the BR,min computation as the min value should be
    subtracted to the nominal one, not added.
    
    Fixes: 9962acf7 ("sfp: add support for 1000Base-PX and 1000Base-BX10")
    Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    52c5cd1b
sfp-bus.c 15.5 KB