diff options
| author | Andrii Staikov <[email protected]> | 2023-11-13 15:10:22 -0800 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-11-14 20:05:43 -0800 |
| commit | 2c0fa38a579f96cdee372965d6b0c06c40806cad (patch) | |
| tree | 1d0b72626ed7e1fe511416d28d440d2258e7758b | |
| parent | add35e623e77fd48c4720d0d8cf1f0f425149ed4 (diff) | |
i40e: Change user notification of non-SFP module in i40e_get_module_info()
Make the driver not produce an error message on
"ethtool -m ethX" command when a non-SFP module is encountered
hence there is no possibility to read the EEPROM.
Make the message to appear in the debug log rather
than as an error string.
Change the return code to -EOPNOTSUPP and the string to make
it more verbose.
Signed-off-by: Andrii Staikov <[email protected]>
Reviewed-by: Wojciech Drewek <[email protected]>
CC: Stefan Assmann <[email protected]>
CC: Michal Schmidt <[email protected]>
Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c index 2e781fe24bba..93525a982df2 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c @@ -5584,8 +5584,8 @@ static int i40e_get_module_info(struct net_device *netdev, modinfo->eeprom_len = I40E_MODULE_QSFP_MAX_LEN; break; default: - netdev_err(vsi->netdev, "Module type unrecognized\n"); - return -EINVAL; + netdev_dbg(vsi->netdev, "SFP module type unrecognized or no SFP connector used.\n"); + return -EOPNOTSUPP; } return 0; } |