]> git.baikalelectronics.ru Git - kernel.git/commit
sfp: fix EEPROM reading in the case of non-SFF8472 SFPs
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 15 Dec 2017 16:09:41 +0000 (16:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Dec 2017 19:57:48 +0000 (14:57 -0500)
commita9182d6124e66317493cf34f38576d188e0b6030
treed80d005d64cb8214246c3940695a77628e3f4eb5
parent86c3235620c6c1044c811addf58114577570129e
sfp: fix EEPROM reading in the case of non-SFF8472 SFPs

The EEPROM reading was trying to read from the second EEPROM address
if we requested the last byte from the SFF8079 EEPROM, which caused a
failure when the second EEPROM is not present.  Discovered with a
S-RJ01 SFP module.  Fix this.

Fixes: 345560d0b720 ("sfp: add SFP module support")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c