]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: Fix get module eeprom fallback
authorIvan Vecera <ivecera@redhat.com>
Thu, 16 Jun 2022 16:08:55 +0000 (18:08 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 18 Jun 2022 03:22:16 +0000 (20:22 -0700)
commit00c080b1cc70f1e963286c400b77126d0b33d41a
tree14fe470a9a85ec10e61732fd374e9fb418217d5f
parent539deb85ceb9a2c35e2f52c28a8689c7bbaddb9b
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: 720ead11a7de ("ethtool: Add fallback to get_module_eeprom from netlink command")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20220616160856.3623273-1-ivecera@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/eeprom.c