]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: sfp: fix the BR,min computation
authorAntoine Tenart <antoine.tenart@bootlin.com>
Fri, 4 May 2018 15:10:54 +0000 (17:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 May 2018 17:30:10 +0000 (13:30 -0400)
commit8bd851bfc8b6ca5ad9e9ed053a4697568ec5b559
tree2c0c03eaafcefaa24f619bf56eda9fbde96d37f8
parent136ed2360310d97cbf00d245d0afcd22b3ca1583
net: phy: sfp: fix the BR,min computation

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: 5e31364a044c ("sfp: add support for 1000Base-PX and 1000Base-BX10")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp-bus.c