]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 26 Mar 2018 12:16:24 +0000 (09:16 -0300)
commit0939a360815a54b78f6add5149aa3167fdb3c22c
tree64a0dfbcb30ad11eaae0a513fc70d8feb871d245
parent8ee3644c494f2a4c20910ef3a8af081c3efc7e48
sfp: fix EEPROM reading in the case of non-SFF8472 SFPs

BugLink: http://bugs.launchpad.net/bugs/1758886
[ 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>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/phy/sfp.c