Skip to content

Commit a3bb7b6

Browse files
Ivan Vecerakuba-moo
authored andcommitted
ethtool: Fix get module eeprom fallback
Function fallback_set_params() checks if the module type returned by a driver is ETH_MODULE_SFF_8079 and in this case it assumes that buffer returns a concatenated content of page A0h and A2h. The check is wrong because the correct type is ETH_MODULE_SFF_8472. Fixes: 96d971e ("ethtool: Add fallback to get_module_eeprom from netlink command") Signed-off-by: Ivan Vecera <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 7a9214f commit a3bb7b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ethtool/eeprom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static int fallback_set_params(struct eeprom_req_info *request,
3636
if (request->page)
3737
offset = request->page * ETH_MODULE_EEPROM_PAGE_LEN + offset;
3838

39-
if (modinfo->type == ETH_MODULE_SFF_8079 &&
39+
if (modinfo->type == ETH_MODULE_SFF_8472 &&
4040
request->i2c_address == 0x51)
4141
offset += ETH_MODULE_EEPROM_PAGE_LEN * 2;
4242

0 commit comments

Comments
 (0)