]> git.dujemihanovic.xyz Git - linux.git/commit
net: sfp: avoid EEPROM read of absent SFP module
authorIvan Bornyakov <i.bornyakov@metrotek.ru>
Thu, 6 Apr 2023 13:08:33 +0000 (16:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 9 Apr 2023 15:01:28 +0000 (16:01 +0100)
commitbef227c1537cb8005311c0842bc5449e8c7a5973
treeab9b924053b727145b72e3d46401acee71c16496
parent813c2dd78618f108fdcf9cd726ea90f081ee2881
net: sfp: avoid EEPROM read of absent SFP module

If SFP module is not present, it is sensible to fail sfp_module_eeprom()
and sfp_module_eeprom_by_page() early to avoid excessive I2C transfers
which are garanteed to fail.

Suggested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ivan Bornyakov <i.bornyakov@metrotek.ru>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c