]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 10:02:47 +0000 (11:02 +0100)
commitb03b5f94dcf4a5d3fc0d45b3f585a54b07adc7de
tree09960c3d76450002e4350c0f8fc701b9d6309313
parent1d40cdd339cb06aeadd8a56a5e5c393898c4ad98
sfp: fix EEPROM reading in the case of non-SFF8472 SFPs

[ Upstream commit 2794ffc441dde3109804085dc745e8014a4de224 ]

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: 73970055450e ("sfp: add SFP module support")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/sfp.c