Skip to content

Commit 2c0fa38

Browse files
CuriousPanCakekuba-moo
authored andcommitted
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]>
1 parent add35e6 commit 2c0fa38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/intel/i40e/i40e_ethtool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5584,8 +5584,8 @@ static int i40e_get_module_info(struct net_device *netdev,
55845584
modinfo->eeprom_len = I40E_MODULE_QSFP_MAX_LEN;
55855585
break;
55865586
default:
5587-
netdev_err(vsi->netdev, "Module type unrecognized\n");
5588-
return -EINVAL;
5587+
netdev_dbg(vsi->netdev, "SFP module type unrecognized or no SFP connector used.\n");
5588+
return -EOPNOTSUPP;
55895589
}
55905590
return 0;
55915591
}

0 commit comments

Comments
 (0)